Tom Van Cutsem at
Wed Sep 28 00:19:38 PDT 2011

2011/9/27 David Bruant <david.bruant at>

> I just wanted to give a follow-up on that. I implemented it:

Nice experiment.

Also, I implemented another flavor of Forwarder (similar to [1]) which
> explicitly calls Object.getPrototypeOf when needed (which allows me to
> return a different value when needed). I have no opinion on whether it's
> better or worse, but i just wanted to point it out.

Right, I've also been thinking about this. There are two possible forwarding
1) one that uses the "virtual" prototype passed to Proxy.create
2) one that uses Object.getPrototypeOf(target)

Option #2 is what's in the proposal [1]. I think that's a safe bet, since
most proxies will not want to interfere with the prototype chain and will
probably even set the virtual prototype equal to the target's prototype, in
which case #1 and #2 are the same. We could make the choice between #1 and
#2 configurable, but I don't think it's worth the additional complexity.


> David
> [1]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list