W3C home > Mailing lists > Public > public-html@w3.org > July 2009

Re: event.currentTarget and 'this' for listeners registered on the window object

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Tue, 14 Jul 2009 04:37:06 -0400
To: "Ian Hickson" <ian@hixie.ch>
Cc: public-html@w3.org
Message-ID: <op.uw1t74ar1ejg13@sandra-svwliu01>
On Tue, 14 Jul 2009 01:36:31 -0400, Ian Hickson <ian@hixie.ch> wrote:

> On Sat, 20 Jun 2009, Michael A. Puls II wrote:
>>
>> window.addEventListener("input", function(e) {
>>     alert(e.currentTarget)
>> }, false);
>>
>> Should e.currentTarget and 'this' be equivalent to  
>> e.target.ownerDocument or
>> e.target.ownerDocument.defaultView?
>
> The DOM3 Events spec seems clear that the currentTarget should be the
> object on which the events are registered (window in this case).
>
> I'm not sure what any spec says about "this", but that seems out of scope
> for HTML5. I recommend raising this with www-dom for DOM3 Events.

O.K. Thanks.

-- 
Michael
Received on Tuesday, 14 July 2009 08:37:46 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:48 UTC