W3C home > Mailing lists > Public > www-style@w3.org > July 2013

Re: [css-variables] CSSVariablesMap enumeration

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Tue, 2 Jul 2013 09:07:50 -0700
Message-ID: <CABZUbM11Qn2qAwQOVN6C=qNzyeQSacFtC1vyehdvc2hOAY0inw@mail.gmail.com>
To: Alan Cutter <alancutter@chromium.org>
Cc: www-style@w3.org, jackalmage@gmail.com
On 6/20/13, Alan Cutter <alancutter@chromium.org> wrote:
> Hello,
>
> I've taken over the CSS Variables implementation in Blink. I have some
> concerns/questions regarding iterating over a CSSVariablesMap object.
>
> At the moment enumeration over a CSSVariablesMap is only indicated in an
> example.
>
> var customProps = el.style.var;
I've explained why creating an easily-avoidable problem is insanity.

http://lists.w3.org/Archives/Public/www-style/2012Sep/0035.html

Pertinent point:
| The use of a ReservedWord as an
| identifier will fail with SyntaxError
| in some less-recent
| implementations (those that did not
| support what was then a syntax
| extension)

> for(customPropName in customProps) {
>   if( knownCustomPropName(customPropName) ) {
>     var customPropValue = customProps[customPropName];
>     /* Processing code here. */
>   }
> }
>
> It is hard to find a concrete specification that it has this behaviour.
Good! That means flexibility. But it's still worth asking why, as
there may be other reasons implementors did not.

Why else didn't it get implemented?

[...]
-- 
Garrett
Twitter: @xkit
personx.tumblr.com
Received on Tuesday, 2 July 2013 16:08:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC