Re: [whatwg/dom] Should "If target's root is a shadow root, then set event’s target attribute and event’s relatedTarget to null. " be based on the path before dispatch (#562)

This was initially added for #511 by @TakayoshiKochi.

If we move target out of a shadow tree, relatedTarget would still leak, so yeah, we should probably change the logic here.

I also think my logic in https://github.com/whatwg/dom/pull/513#issuecomment-334387376 was wrong with respect to relatedTarget not able to leak something. If you dispatch a synthetic event and set relatedTarget yourself you would be able to leak something. It's a little unclear if we should guard against that, but it seems reasonable?

Another problem here is that we don't reset anything for touch events. I'm not sure how to address them.

@whatwg/components 

-- 
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/issues/562#issuecomment-371349822

Received on Thursday, 8 March 2018 01:48:34 UTC