Chrome Version : trunk
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari: FAIL
Firefox: FAIL (but I'm fixing in https://bugzilla.mozilla.org/show_bug.cgi?id=1498445)
IE/Edge: PASS
What steps will reproduce the problem?
let element = document.createElement("div");
element.style.width = "somethingthatisclearlynotawidth";
console.log(element.hasAttribute("style"));
What is the expected result?
false is logged to the console.
What happens instead of that?
true is logged to the console.
Please provide any additional information below. Attach a screenshot if
possible.
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.
Comment 1 by emilio@chromium.org
, Oct 12