W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 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: Fri, 03 Oct 2014 02:14:02 +0000
To: public-script-coord@w3.org
Message-ID: <bug-26183-3890-tdl5LX3iWQ@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26183

Cameron McCormack <cam@mcc.id.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #27 from Cameron McCormack <cam@mcc.id.au> ---
I've taken a crack at it.

https://github.com/heycam/webidl/commit/1bc1e2904d3cd90d7856e184cb4b5f10d26b8d96

http://heycam.github.io/webidl/#idl-iterable
http://heycam.github.io/webidl/#idl-maplike
http://heycam.github.io/webidl/#idl-setlike

http://heycam.github.io/webidl/#es-iterators
http://heycam.github.io/webidl/#es-iterable
http://heycam.github.io/webidl/#es-maplike
http://heycam.github.io/webidl/#es-setlike

Note that I didn't just set <maplikeinterface>.prototype.set to
%MapPrototype%.set etc., because that just opens up the issues of how to deal
with Map.prototype.set.call(<maplikeobject>) again.  So instead I've got
backing Map and Set objects hidden off an internal slot of objects that are
maplike/setlike, and functions on their prototypes that just forward on to the
corresponding built-in function on the hidden Map/Set.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Friday, 3 October 2014 02:14:05 UTC

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