W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2010

Re: Event Handler Attribute

From: Joćo Eiras <joao.eiras@gmail.com>
Date: Fri, 24 Dec 2010 06:51:39 -0000
To: "DOM mailing list" <www-dom@w3.org>
Message-ID: <op.vn7hccqmjz3wb9@coruscant>
On , Garrett Smith <dhtmlkitchen@gmail.com> wrote:

> Where is the `thisArg` specified in D3E? Context for event handler
> properties or eventListeners registered with addEventListener is
> generally set to the object on which the callback has been set on.
> Example:
>   document.body.addEventListener("click", f, false);
>   function f() {
>     alert( this === document.body );
>   }
> That behavior should be specified somewhere, and if not in D3E, then
> somewhere that D3E links to, like HTML5.

Given that the spec never referred to inline functions as listeners, because that belongs in the ecmascript bindings, it was always implied to be the EventListener object. Setting thisArg to the currentTarget of the event is a defacto behavior by browsers.
So just needs some clarification in the proper ecmascript bindings section.
Received on Friday, 24 December 2010 06:52:13 UTC

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