[[Invoke]] and implicit method calls

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Sep 10 08:03:05 PDT 2013


On Sep 10, 2013, at 3:55 AM, Till Schneidereit wrote:
>  
> When implementing the [[Invoke]] trap in SpiderMonkey, I went with the assumption that it should apply to all calls of the forms `receiver.fun()` and `receiver["fun"]()`. Jason pointed out that `with (receiver) { fun() }` should be caught, too. Doing anything else would make for a surprising restriction of proxies' capabilities compared to manually overriding methods, IMO.

Yes, that's already covered in the spec. See http://people.mozilla.org/~jorendorff/es6-draft.html#sec-12.2.3 Step 1.b of EvaluateCall
> 


Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130910/377701f4/attachment-0001.html>


More information about the es-discuss mailing list