W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2011

Re: HTML5 spec. seems to unnecessarily ban strict mode event handlers

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Thu, 3 Feb 2011 16:24:50 -0800
Cc: EcmaScript <es-discuss@mozilla.org>, public-script-coord@w3.org
Message-Id: <C7F344C0-BA77-434B-8CA2-FC2946D3F07C@wirfs-brock.com>
To: Garrett Smith <dhtmlkitchen@gmail.com>
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

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


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:02 UTC