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

Re: [css-variables] CSSVariablesMap enumeration

From: Erik Arvidsson <arv@chromium.org>
Date: Tue, 2 Jul 2013 09:28:33 -0400
Message-ID: <CAJ8+GoiQo4k9RjvdNtdvmi1eT+zG0j-MjC4Wq0Q+4m0joLA+vg@mail.gmail.com>
To: Alan Cutter <alancutter@chromium.org>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
This thread has a few errors in it.

The methods are called entries, keys and values. entries is the default
iterator (Map.prototype.entries = Map.prototype[@@iterator]).

entries, keys and values returns an iterator (not an Array). That is an
object that as a next method that returns {value: any, done, boolean}.

FWIW, for-of is available in Chrome too (behind a flag though :'( )


On Thu, Jun 20, 2013 at 7:40 PM, Alan Cutter <alancutter@chromium.org>wrote:

> That clears things up. Thanks for clarifying!
>
>
> On 21 June 2013 05:12, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>
>> On Thu, Jun 20, 2013 at 11:20 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> > On 6/20/13 1:41 PM, Tab Atkins Jr. wrote:
>> >> When we get for-of loops
>> >
>> > What's this "when"?  They've been shipping for a year now in Firefox.
>>  ;)
>>
>> I know, but *we* (Blink) don't have them yet. ;_;
>>
>> >> it'll automatically
>> >> iterate with whichever one is default for Maps, which I think is
>> >> .keys().
>> >
>> > It's items(), as far as I can tell from the spec and a basic test.
>>
>> Ah, kk.
>>
>> ~TJ
>>
>>
>


-- 
erik
Received on Tuesday, 2 July 2013 13:29:20 UTC

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