[cssom] Supporting JS properties whose names are CSS property names on CSSDeclaration objects

Apparently Trident (including in standards mode) and WebKit support 
properties on their CSSDeclaration objects whose names are property 
names.  Presto and Gecko do not.

What this means is that something like this:

   document.body.style["font-size"] = "20px"

works in Trident and WebKit but not in Presto and Gecko.  Worse yet, 
something like this:

   document.getElementById("something").style.float = "right"

works in Trident and WebKit but not in Presto and Gecko.

Seems to me like this behavior should be either dropped or specified. 
I'm assuming for now that it's intentional and hence chances of the 
former are nil, but please do tell me if I'm wrong.

-Boris

Received on Wednesday, 15 February 2012 20:10:39 UTC