Re: [w3c/webcomponents] Need "slotchange" event (#288)

I'm still struggling a bit with how to best define this. My idea was to effectively run slotting whenever you insert, but if we want to define "slotchange", we'll need to keep records to know something actually changed as a result of an insert or remove.

For insert, it seems these two are significant:
* The node is being inserted into a parent node that also has a shadow root
* An inclusive-descendant of node is a slot element and node's (new) root is a shadow root

For remove:
* The parent was a slot element
* The parent was a node with a shadow root (shadow host)
* Node has a slot element as inclusive-descendant and node's root was a shadow root

So when those happen we need to "reslot" 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.

Does this brain storm sound reasonable?

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

Received on Thursday, 7 April 2016 09:43:57 UTC