Re: [whatwg/dom] Add window.event, event.srcElement, event.returnValue as a legacy compat requirements (#407)

> while this should be based on information known prior to dispatch.

Yeah, this definitely. Should also make the implementation faster, at least in Gecko.

But why is the check based on target and not currentTarget? I would have expected window.event to be null/undefined whenever an event listener in shadow DOM tries to access it. I think that makes the feature easier to understand - it works only in light DOM, and scripts in shadow DOM can't use it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/407#issuecomment-376868065

Received on Wednesday, 28 March 2018 12:26:32 UTC