Non-generic traps for non-generic objects (was: Overriding Map/etc with get/set hooks?)
Tom Van Cutsem
tomvc.be at gmail.com
Sat May 25 01:33:38 PDT 2013
2013/5/24 Tab Atkins Jr. <jackalmage at gmail.com>
> The problem is that the Map#set method grabs an *internal property*,
> bypassing Proxies, etc., so you can't defend against it.
Just to clarify, grabbing internal properties doesn't bypass proxies, not
as currently specced.
That's why Map.prototype.set.call(m,k,v) failed in my example upstream
(where m is a proxy). The Map#set method will not bypass the proxy to reach
into the wrapped object's [[MapData]].
I think what you meant is that accessing an internal property doesn't
trigger any proxy traps, so you can't directly intercept it. That is true.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss