On Tue, Sep 10, 2013 at 5:03 PM, Allen Wirfs-Brock <al...@wirfs-brock.com>wrote:

>
> 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
>

I didn't mean to put the focus on `with`, sorry. I meant that trapping
[[Invoke]] shouldn't leave any calls untrapped that the user can "trap"
manually by overriding methods. For that to work, a version of [[Invoke]]
seems to be required that doesn't throw if the method doesn't exist on the
receiver, though.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to