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

Jordan Harband ljharb at
Sun Sep 25 03:37:53 UTC 2016

Does a trap for `[[Get]]` on `Symbol.iterator` not provide you the ability
to intercept iteration by returning a custom function?

On Sat, Sep 24, 2016 at 8:34 PM, Tycho Grouwstra <tychogrouwstra at>

> I'd like to propose adding support for an iteration trap handler for
> Proxy, fleshing out the list of [currently supported Proxy handlers](
> Objects/Proxy#Methods_of_the_handler_object).
> 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