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

Re: [css-variables] How to spec the OM for vars?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 23 Aug 2012 21:55:49 -0700
Message-ID: <50370955.4030609@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style@w3.org
On 8/23/12 6:22 PM, Tab Atkins Jr. wrote:
> That works nicely with the existing attributes, I assume?  Or do I
> need to write the getter/setter to handle them as well?

Well, at least in Gecko+SpiderMonkey the open-ended-set stuff is a good 
bit slower than normal getters/setters; much harder for a JIT to 
optimize.  So no, it doesn't really work that nicely for things that the 
web does a lot right now like reading and writing inline style.

So my personal preference would be to use the IDL "getter" and "setter" 
syntax for vars only and use normal IDL attributes for actual properties.

> Neither of these should be much of a problem.  All custom property
> have a "var-" prefix,

Ah, excellent.

-Boris
Received on Friday, 24 August 2012 04:56:19 GMT

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