Re: Event Handler Attribute

On 12/24/2010 06:01 AM, Cameron McCormack wrote:
> Hi Doug.
>
> Garrett Smith:
>>> That behavior should be specified somewhere, and if not in D3E, then
>>> somewhere that D3E links to, like HTML5.
>
> Doug Schepers:
>> DOM3 Events doesn't define script execution (in fact, it tries to be
>> language-neutral, and should work with Java as well as Javascript).
>
> I agree with Garrett it needs to be defined somewhere.  The DOM 3 Events
> spec itself seems most appropriate, since this is specifically for
> when EventListeners are invoked (and not for all callbacks in general).
>
> Web IDL has a spec language hook for this:
>
>    http://dev.w3.org/2006/webapi/WebIDL/#dfn-callback-this-value
>
> So if Web IDL were being used, you could say something like:
>
>    When invoking an EventListener implemented in ECMAScript, its
>    _callback this value_ must be the target of the event.

Not target but currentTarget ;)



>
> But even without that, it’d just be a simple matter of noting what
> ‘this’ must be bound to when invoking the EventListener.
>

Received on Wednesday, 5 January 2011 22:24:54 UTC