We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
CSSStyleDeclaration.prototype.setProperty is not working on properties with hyphen (margin-left, padding-left ect ...)
CSSStyleDeclaration.prototype.setProperty
It is because the the property name passed to setAttribute must be camel cased.
setAttribute
I noticed the bug on IE8 (real IE8, not a more recent one in IE8 mode)
Test case:
<!DOCTYPE html> <html> <body> <span id="item"> abc </span> <script> var item = document.getElementById("item") item.style.setAttribute('margin-left', '40px') //Not working item.style.setAttribute('marginLeft', '40px') // Working \o/ </script> </body> </html>
The text was updated successfully, but these errors were encountered:
fix #40
a0aa14c
add more/better tests for CSSOM, per #40
21259ed
d6d7994
fixed in #49, huzzah!
Sorry, something went wrong.
awesome ! Thanks @shawnbot
shawnbot
No branches or pull requests
Hi,
CSSStyleDeclaration.prototype.setProperty
is not working on properties with hyphen (margin-left, padding-left ect ...)It is because the the property name passed to
setAttribute
must be camel cased.I noticed the bug on IE8 (real IE8, not a more recent one in IE8 mode)
Test case:
The text was updated successfully, but these errors were encountered: