> It is not. At the exit of the get trap, the JS engine checks whether
> invariants should be enforced for the given property on the target. In your
> case, the runtime sees that the target has a non-configurable non-writable
> property called 'foo' with 1 as value. When you try to return 0, it will
> throw a TypeError because of invariant violation. You can read about
> invariants at
> http://wiki.ecmascript.org/doku.php?id=harmony:direct_proxies#invariant_enforcement
>
>
Excellent - thanks for the link!  One more:  What is the reason for not
providing an API for unwrapping a proxy (e.g. your proxyToFinalTarget)?

{ Kevin }
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to