- From: Ryosuke Niwa <notifications@github.com>
- Date: Thu, 07 Apr 2016 02:54:00 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/288/206791125@github.com>
So you want to fire `slotchange` event when a slot element is newly inserted into a shadow root or removed from a shadow root? I'm not sure if that makes sense. The event I implemented in WebKit wouldn't get fired in those cases. > So when those happen we need to "result" a bit and I guess we'd simply check whether an element was already assigned somewhere and if it remains assigned to the same slot it doesn't count as a change. That sounds right. You DO need to recursively check `assignedSlot`'s `assignedSlot`if it's not null as we're affecting the distributed nodes of all those slot elements. For example, if I inserted a node N under a shadow root R1 with a slot element S1, and we realize that N is now newly assigned to S1. Then, that could affect the distributed nodes of another slot element S2 to which S1 had been assigned. If there is such a slot S2, we'd check whether S2 is assigned to another slot for the same reason, and so on and so forth. --- 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/288#issuecomment-206791125
Received on Thursday, 7 April 2016 09:54:27 UTC