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

@treshugart Nevermind, I think I got it: for a given `<content>` element that we wish to observe for distribution changes, we can traverse up from it to find the shadow root host, then use `MutationObserver` on the host to detect changes in children, and whenever changes happen we just call `.getDistributedNodes()` on the `<content>` element to find the new distribution and compare against the previous result to determine if there was a change in distribution.

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

Received on Thursday, 1 December 2016 23:50:09 UTC