Re: Event Handler Attribute

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.

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

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Friday, 24 December 2010 04:02:33 UTC