W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

Re: [Bug 198595] event.target, event.currentTarget and the this object are not set consistently in onload handlers of XMLHttpRequest and XMLDocument (fwd)

From: Maciej Stachowiak <mjs@apple.com>
Date: Mon, 13 Mar 2006 00:46:46 -0800
Message-Id: <B1B5D36B-4F38-45DB-84D0-FAB6693C12BD@apple.com>
Cc: Ian Hickson <ian@hixie.ch>, public-webapi@w3.org
To: Jonas Sicking <jonas@sicking.cc>


On Mar 10, 2006, at 1:47 PM, Jonas Sicking wrote:

>
> Ian Hickson wrote:
>> Please consider this when writing the ECMAScript binding for DOM3  
>> Events.
>
> I believe that we have already addressed this in our meetings. Not  
> sure if it has made it into the spec draft yet.
>
> The resolution was that |this| is set to event.currentTarget in  
> ECMAScript when a EventListener is given as a function.
>
> When the EventListener is given as an object we should just call  
> the handleEvent function on that object and so |this| should point  
> to that object.

And future specs that allow binding of event listeners should define  
themselves in terms of DOM 3 Events constructs.

Regards,
Maciej
Received on Monday, 13 March 2006 12:10:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:53 GMT