[Bug 20713] Consider defining window.event and Event.srcElement

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20713

Anne <annevk@annevk.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugs@pettay.fi,
                   |                            |bzbarsky@mit.edu

--- Comment #7 from Anne <annevk@annevk.nl> ---
(In reply to Philip Jägenstedt from comment #6)
> Event.srcElement is around 20%:
> https://www.chromestatus.com/metrics/feature/timeline/popularity/343
> 
> It's just an alias of target, so adding that seems like the only way to go.

This seems very similar to the isSameNode() situation as Mozilla never added
it. If Mozilla wants to add this, we should probably define it, along with
window.event as I believe they cannot be decoupled.


> Window.event is around 4% now:
> https://www.chromestatus.com/metrics/feature/timeline/popularity/69
> 
> https://code.google.com/p/chromium/issues/detail?id=223749#c3 says that
> "Inline event handlers have a local `event` binding in scope." but I'm not
> sure if that's how it works in Blink. However it works, stuff like
> onclick="event.target.style.color='red'" has to work.

event.target can work by putting that in the local scope, you don't need a
global property for that to work per se.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Saturday, 20 December 2014 10:01:53 UTC