-
Notifications
You must be signed in to change notification settings - Fork 710
[cssom] CSSStyleRule.style assignability (?) differs across browsers #1506
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
Comments
[EDIT: updating this comment to simplify testcase further & correct myself; I previously misunderstood what was going on under the hood in Safari/Edge] More direct testcase:
In Firefox 55 Nightly & Chrome Dev 60, this outputs:
In Safari 10.1 & Edge 15, this instead outputs:
The last two lines are where we differ -- specifically, browsers disagree about what happens when you directly set
|
So for me, this boils down to a question of what "readonly" means here in CSSOM 6.4.3:
...vs. in this later text in the same section:
I'm not 100% sure which of those are authoritative about whether or not |
The first "readonly" there is the IDL attribute, saying that the The second "readonly" you quote there is whether the |
Right. All that's happening here is that Safari and Edge don't implement that PutForwards bit from the spec, so assigning to |
Thanks! I think all is well here spec-wise, then. For WebKit, this is tracked in https://bugs.webkit.org/show_bug.cgi?id=164537 (technically that bug is about Unlike WebKit, Edge gets this correct for |
I filed https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12271447/ on this incompatibility in Edge (CC @gregwhitworth ) |
EDIT: It seems like the difference arises due to Safari and Edge not implementing PutForwards, which is an attribute on the
style
field of CSSStyleRule (https://drafts.csswg.org/cssom/#the-cssstylerule-interface).Is CSSStyleRule.style supposed to be live (if that's the right term)? In Firefox and Chrome, the following example will output "", while in Safari it will output "3px":
This is sort of a related issue for Typed OM, where the eventual decision was for the corresponding object to be live: w3c/css-houdini-drafts#149
The text was updated successfully, but these errors were encountered: