Bug 37570
| Summary: | CSSStyleDeclaration CSS properties should be enumerable | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <me> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | ap |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface | ||
Nikita Vasilyev
How to reproduce
------------------
for (k in document.body.style) if (k=="background") console.log("Hooray!")
Expected result
---------------
"Hooray!"
Actual result
-------------
Nothing happens
Notes
-----
In Firefox, Opera, and IE CSS properties are enumerable.
Unlike DOM 2 CSS[1], IDL from CSSOM[2] defines CSS properties as attributes.
Enumerable CSS properties could help me a little with http://webkit.org/b/17374 ,
since it will give me all properties, including shorthands.
[1]: http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
[2]: http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
*** This bug has been marked as a duplicate of bug 23946 ***