-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Values are not properly converted to DOMString #129
Comments
From what I understand, a value is converted to a
https://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
https://heycam.github.io/webidl/#es-type-mapping
https://heycam.github.io/webidl/#es-DOMString I renamed the title of this issue to handle the following cases that were also not handled correctly: target.style.opacity = Symbol('1') // Error
target.style.opacity = { toString: () => [0] } // Error
target.style.opacity = BigInt(1) // '1'
target.style.setProperty('--custom', undefined) // 'undefined'
target.style.setProperty('--custom', true) // 'true'
target.style.setProperty('--custom', { toString: () => null }) // 'null' |
I'm not sure that the following behavior tested in Chrome and Firefox is described in any specification:
Ie. the value should be converted to String if it has a
toString()
method.cssstyle
currently returns''
for all cases, ie. it results to an invalid value. Chrome and Firefox throw an error for case 3.The text was updated successfully, but these errors were encountered: