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

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

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Sat, 20 Jun 2009 05:21:55 -0400
To: public-html@w3.org
Message-ID: <op.uvtgarvr1ejg13@sandra-svwliu01>
window.addEventListener("input", function(e) {
}, false);

Should e.currentTarget and 'this' be equivalent to e.target.ownerDocument  
or e.target.ownerDocument.defaultView?

In Opera and Safari, it's the former (the document). In Firefox it's the  
latter (the window).

Same thing for the 'change' event.

I think Firefox's behavior makes more sense, but I'm not sure what the  
spec says. I see  
but still not sure.

Received on Saturday, 20 June 2009 09:22:35 UTC

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