Re: [css-variables] CSSVariablesMap enumeration

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