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

If I understand you correctly [this jsbin](http://jsbin.com/xexena/1) should work just fine. Just swap v0 for v1 API calls and Bob's your uncle. A child shouldn't need to know where it's slotted; in a composed tree, a child is always slotted into a `<slot>` or is a light DOM child of another node. In the case where it's composed `parentNode` is a `<slot>` then it will always report that its parent is the shadow host, thus the `attachedCallback() / connectedCallback()` should be sufficient.

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

Received on Wednesday, 29 June 2016 10:32:23 UTC