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

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