- From: Allen Wirfs-Brock <allen@wirfs-brock.com>
- Date: Thu, 3 Feb 2011 16:24:50 -0800
- To: Garrett Smith <dhtmlkitchen@gmail.com>
- Cc: EcmaScript <es-discuss@mozilla.org>, public-script-coord@w3.org
Received on Friday, 4 February 2011 14:11:58 UTC
It would seem to depend upon exactly how the WebIDL ECMAScript binding defines the meaning of: The Function interface represents a function in the scripting language being used. It is represented in IDL as follows: [Callback=FunctionOnly, NoInterfaceObject] interface Function { any call(in any... arguments); }; The call(...) method is the object's callback. However, I agree that it must be in terms of [[Call]] and not access to the 'call' property. what does "is the object's callback" actually mean? Allen On Feb 3, 2011, at 4:09 PM, Garrett Smith wrote: > On 2/3/11, Allen Wirfs-Brock <allen@wirfs-brock.com> wrote: >> Regarding the call language, it would probably be best if it was described >> in terms of invoking the [[Call]] internal method of the handler's function >> object. However, that might be unnecessary if if the WebIDL ECMASCript >> binding makes it clear that the effect of invoking the call method of the >> Function interface is defined in terms of [[Call]]. >> > But browsers don't call the `call` property of the function object. > > It's easy to test that: Create a function and give it an own "call" > property on a function or by replacing Function.prototype.call. > > function x() { > alert(1); > } > x.call = function() { > alert('call()'); > }; > >> We may have clashing spec. terminology here but I think the intent seems >> clear enough. >> > Uh uh. >
Received on Friday, 4 February 2011 14:11:58 UTC