iterate and enumerate trap signature inconsistency

Tom Van Cutsem at
Wed Sep 12 01:46:41 PDT 2012

2012/9/12 David Bruant <bruant.d at>

>  [...]
> For the second check, I'd like to note a couple of implementation details
> which are relevant I think. First, as you suggest, the set of minimum
> reported properties has to be decided before the first iteration
> (otherwise, this set may change over the course of the loop). Second, an
> unanswered question is how this set is being retrieved. Is the JS runtime
> performing an Object.getOwnPropertyDescriptor on the proxy (calling the
> trap)? on the target directly? If the target is itself a proxy, on the
> target at the end of the chain (so that no intermediate trap is being
> called)?
> Right now, I have no preference for any of these solutions, but it's a
> detail that will be visible from user script, so it needs to be decided for
> the sake of interoperability.

As currently specified (<>,
algorithm 12.6.4, step 6.k.), the proxy calls the built-in Reflect.keys on
its internal [[Target]] to retrieve the target's enumerable properties,
then checks for configurability of these properties via [[GetOwnProperty]].
This can all stay the same with the iterator design.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list