WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
190506
Style attribute is created when an invalid property value is set via CSSOM
https://bugs.webkit.org/show_bug.cgi?id=190506
Summary
Style attribute is created when an invalid property value is set via CSSOM
Emilio Cobos Álvarez (:emilio)
Reported
2018-10-11 19:43:41 PDT
let element = document.createElement("div"); element.style.width = "somethingthatisclearlynotawidth"; console.log(element.hasAttribute("style")); // logs true, should log false. From
https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
:
> 5. Let component value list be the result of parsing value for property property. > 6. If component value list is null, then return. > [...] > 10. If updated is true, update style attribute for the CSS declaration block.
Edge's behavior is correct, I'm changing Firefox in
https://bugzilla.mozilla.org/show_bug.cgi?id=1498445
, where I'm adding a few tests.
Attachments
Add attachment
proposed patch, testcase, etc.
Emilio Cobos Álvarez (:emilio)
Comment 1
2018-10-11 19:44:59 PDT
Err, actually WebKit is right as well, so never mind me.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug