[[Invoke]] and implicit method calls
allen at wirfs-brock.com
Mon Sep 9 14:50:34 PDT 2013
On Sep 9, 2013, at 2:37 PM, Jason Orendorff wrote:
> There are some places in the spec where we might use [[Invoke]], but don't:
> - implicit .toString() and .valueOf() calls
> (except Object.prototype.toLocaleString)
> - implicit .toJSON() calls
> - calls to Proxy handler methods
> This seems unfortunate. Proxies with default handlers will work in
> most places, thanks to the default [[Invoke]] trap, but not in ("" +
> proxyObject) etc.
> Is this still likely to change?
I'll take a look at it. My first reaction is that this sounds like a good idea.
> The apparent reason [[Invoke]] is not used in these places is that
> they all do a [[Get]] first and check whether the property has a
> callable value.
Actually, I don't think even considered those uses when I added [[Invoke]].
More information about the es-discuss