Re: [w3c/webcomponents] How can a custom element detect when it is transcluded into a shadow tree? (#504)

> and in my case, the custom elements that I'm making need to know where their slots are located and what the parent element of the slot is

I can't really answer without knowing your use-case, but I've found that you should be emitting events that parents respond to. Reaching up in the DOM tree creates a tight coupling of your child component's functionality to the DOM structure in which it's placed defeating the purpose of modularity and componentisation.

---
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/504#issuecomment-222897532

Received on Wednesday, 1 June 2016 05:38:28 UTC