Bug 37570 - CSSStyleDeclaration CSS properties should be enumerable
Summary: CSSStyleDeclaration CSS properties should be enumerable
Status: RESOLVED DUPLICATE of bug 23946
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://dev.w3.org/csswg/cssom/#the-cs...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-14 06:49 PDT by Nikita Vasilyev
Modified: 2010-04-16 11:20 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2010-04-14 06:49:35 PDT
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
Comment 1 Alexey Proskuryakov 2010-04-16 11:20:32 PDT

*** This bug has been marked as a duplicate of bug 23946 ***