-
-
Notifications
You must be signed in to change notification settings - Fork 926
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
updateStyle(): use setProperty() when css vars and dashed-properties, fixes #2989 #2991
Conversation
Welp, thought we could get away with #2985 (comment), but turns out that was too breaking... Edit: I'm keeping it in #2982, though - anyone claiming to implement a web browser or the full DOM should be implementing those properties, and bug reports should be directed at those who claim to do so and don't. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test spying on a style setter to make sure we're only using camel case setters.
@dead-claudia OK, test added. |
d1e247b
to
2278ee4
Compare
2278ee4
to
b4af2f6
Compare
Description
This PR changes updateStyle() to use setProperty() for dashed-properties.
Motivation and Context
This PR maybe fixes #2989
Current mithril (v2.2.10) doesn't seem to work well when using something like domMock, which doesn't have enough support for dashed-properties.
It may not be a browser that Mithril officially supports. But the fix is clear and has little or no impact on performance as discussed in #2985.
How Has This Been Tested?
npm run test
Types of changes
Checklist