Proposal: Proxy iteration (`let ... of ...`) trap handler

saam barati saambarati1 at
Sun Sep 25 04:32:22 UTC 2016

The purpose of the iterator protocol is to be flexible and to work well with custom defined iterators. for...of is more or less sugar around the iterator protocol. Not sure why you even need a Proxy to easily customize for...of behavior for arbitrary objects.

More documentation on the protocol can be found here:

- Saam

> On Sep 24, 2016, at 8:34 PM, Tycho Grouwstra <tychogrouwstra at> wrote:
> I'd like to propose adding support for an iteration trap handler for Proxy, fleshing out the list of [currently supported Proxy handlers](
> I think Proxy is among the most powerful features of JS, so I find it unfortunate iteration, a common operation, is still missing. No new syntax would be required for this addition.
> On a side-note, I'd be happy if there were no additional [requirements]( on usage of such a trap, but I'm not sure that would complicate implementation.
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list