-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A little confused with converting symbol to 'DOMString' #14
Comments
There are many ways to convert things to a string. However, the Web IDL spec, which this library implements, chooses one of them: https://heycam.github.io/webidl/#es-DOMString step 2. That should provide the answer. |
Thank you, I think maybe I should do a little patching an wrapping in my own code |
cexbrayat
added a commit
to cexbrayat/vue-next
that referenced
this issue
Nov 18, 2021
Currently, passing a `Symbol` to an attribute throws in `runtime-dom` with: ``` TypeError: Failed to execute 'setAttribute' on 'Element': parameter 2 is a symbol, which cannot be converted to a string. ``` This is because the underlying library used for conversion does not handle Symbol (see jsdom/webidl-conversions#14). This issue cascades into VTU-next as `shallowMount` attempts to write props values as attributes. See vuejs/test-utils#1076 for more context.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When unit testing with jest I get a TypeError, so I dug into this line
In ecma-262 spec, there is
Symbol.prototype.toString()
method, it seems to me that convertion from Symbol to String should not raise a Error.Would you be kind enough to explain this?
The text was updated successfully, but these errors were encountered: