W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2011

Re: Event Handler Attribute

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Thu, 06 Jan 2011 00:18:02 +0200
Message-ID: <4D24EE1A.40808@helsinki.fi>
To: Doug Schepers <schepers@w3.org>, Garrett Smith <dhtmlkitchen@gmail.com>, DOM mailing list <www-dom@w3.org>
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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:17 UTC