[[Invoke]] and implicit method calls
brendan at mozilla.com
Mon Sep 23 12:53:33 PDT 2013
Till Schneidereit wrote:
> The issue triggering this entire thread is that some spec algorithms
> don't use [[Invoke]], so the .invoke trap isn't triggered for them.
> I'm now convinced that seeing that as an issue is ascribing too much
> power to the .invoke trap. Let's state its behavior this way: "the
> .invoke trap is triggered by direct method calls on the proxy object
> in the form of `proxy.method()` or `proxy["method"]()`. It is not
> triggered by invocations of a function that was extracted from a proxy
> object." It makes a lot of sense that there might be spec algorithms
> (just as other code that might use the proxy object) that call
> functions *after* extracting them from their receiver. Which goes to
> show that properly implementing proxies isn't easy, not that the
> .invoke trap is somehow broken.
+1, well put.
More information about the es-discuss