- From: Ryosuke Niwa <notifications@github.com>
- Date: Fri, 15 Jul 2016 21:48:34 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Saturday, 16 July 2016 04:49:02 UTC
Ah, okay. So what event re-targeting does is that, it tries to make `event.target` return a `EventTarget` (often an instance of `Node`) which is in the same tree as the current target. Let's say you dispatched an event inside a shadow tree. Then when the event bubbles out of the shadow tree, it sets the target to its host. This allows the code outside the shadow tree to work as if the shadow tree didn't exist at all. Without event retargeting, authors need to think about in which tree `event.target` belongs, and walk up the ancestor chain to find the node which belongs to the same tree as the node the event listener is attached. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/528#issuecomment-233108107
Received on Saturday, 16 July 2016 04:49:02 UTC