- From: Trey Shugart <notifications@github.com>
- Date: Wed, 28 Dec 2016 13:51:37 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 28 December 2016 21:52:10 UTC
If there is such an implementation, I think it should be called both on when the children are first added as well as when children change. There's a [similar proposal](https://github.com/skatejs/skatejs/issues/863) and I've been playing around with similar implementations in the corresponding PR. The problem arose from needing to get nodes for a certain slot so that we could `render()` out information based on those nodes, such as a TodoMVC implementation where you need to show the todo count based on the number of items (in this case, added as light DOM). It seems that if a `childrenChangedCallback()` existed, that we'd be able to optimise this implementation. Currently, the PR for that issue has to completely subvert `slotchange` and use a `MutationObserver` because that event doesn't fire when the children are first attached to the host, but only on subsequent updates. This is problematic for reasons mentioned in the issue. -- 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/619#issuecomment-269546794
Received on Wednesday, 28 December 2016 21:52:10 UTC