W3C home > Mailing lists > Public > www-style@w3.org > February 2012

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 15 Feb 2012 15:10:10 -0500
Message-ID: <4F3C1122.6020306@mit.edu>
To: www-style list <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT