W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2014

[Bug 26183] make it easier to define an iterator on an interface that iterates over a set of values

From: <bugzilla@jessica.w3.org>
Date: Tue, 30 Sep 2014 00:19:22 +0000
To: public-script-coord@w3.org
Message-ID: <bug-26183-3890-ZRiVImobbt@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26183

--- Comment #15 from Cameron McCormack <cam@mcc.id.au> ---
(In reply to Anne from comment #1)
> Note that we might want to represent these values using different objects.
> E.g. FormData internally has a list of values that are tuples. And when
> iterating over them we want these to be arrays. (We should also make it
> clear whether those arrays are reused or are fresh each time. Fresh each
> time seems easiest.)

Any time we want to expose internal data through the iterator, we're going to
need to use prose to define the values that get iterated, so I don't think we
need anything in the IDL syntax here to handle FormData iteration.

> Note that we should also be clear with respect to whether the iterator
> returns a snapshot of the underlying data or not. Maybe with syntax? E.g.
> for NodeList the current idea is for the iterator to be live (match the
> semantics of the object), but I suspect most others we would like it to be
> static.

For objects that expose indexed properties in a non-live fashion, then we don't
need to do anything special -- the default Array iterator is going to work on
it too.  So I think we don't need anything here either.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 30 September 2014 00:19:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC