Re: [w3c/webcomponents] Event retargetting in layman's terms? (#528)

If that's all it's for, then it sounds like end developer don't really need to even worry about it? Because they just apply event listeners on the host or on the light-tree elements that they are explicitly creating.

For example, if you look at the basic components I made in https://github.com/w3c/webcomponents/issues/504#issuecomment-233103077, then if I am the author of the `DynamicMenuLayout` class, I just add event handlers to the `push-pane-layout` or those direct `motor-node` children, without even thinking about how event handling works inside the shadow tree of the `push-pane-layout` element.

Is that what you mean? That as the component *user* I only worry about the events in the outer tree of `my` component (the outer tree, which is that tree that I write myself, while the inner tree is the tree that someone else defined as the shadow tree of the `push-pane-layout` component)?

TLDR, end users of a component write event handlers as they always did before (if following my same design pattern as in my linked example)?

Seems like this may be more a detail of ShadowDOM implementation than it is anything a final web-stack user should need to really understand. Is there any case in which a Web Component author *does* need to think about retargeting?

---
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-233215210

Received on Monday, 18 July 2016 01:16:08 UTC