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 01:05:25 +0000
To: public-script-coord@w3.org
Message-ID: <bug-26183-3890-eSS85jda8X@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26183

--- Comment #16 from Cameron McCormack <cam@mcc.id.au> ---
(In reply to Cameron McCormack from comment #0)
> Currently the spec requires you to define the "iterator behavior" and a
> bunch of other definitions "when you use "iterator;" on an interface.  There
> should be an easier way to make an object's iterator just go over a set of
> values.

I've added an "iterate a list of values" pre-defined iterator behaviour that
you can reference, which avoids needing to define the stuff about the iterator
state and returning values.

https://github.com/heycam/webidl/commit/d948eb363201bb7f2d66cf52c391704660fb9f82

http://heycam.github.io/webidl/#dfn-iterate-a-list-of-values

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 30 September 2014 01:05:29 UTC

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