HTML5 spec. seems to unnecessarily ban strict mode event handlers

Garrett Smith dhtmlkitchen at gmail.com
Thu Feb 3 16:09:28 PST 2011


On 2/3/11, Allen Wirfs-Brock <allen at 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.


More information about the es-discuss mailing list