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

> For insert, it seems these two are significant:

"Insert" means this timing, https://dom.spec.whatwg.org/#concept-node-insert, right?
I am assuming that we do nothing at the timing of *insertion steps* (https://dom.spec.whatwg.org/#concept-node-insert-ext).


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

It looks we should remove the condition of "node's (new) root is a shadow root" from there.

e.g.
The following might not be a practical example, but it could happen:

document tree:
```html
<x-foo>
  <slot id=s1>
    <div id=inserted></div> <--- inserted
  </slot>
</x-foo>
```
x-foo' shadow tree:
```html
<slot id=s2></slot>
```
#s2's "slotchange" should be fired if #inserted is inserted as a child of #s1.
#inserted's root is not a shadow root in this case.

In addition to insert and remove, we have to check the change of element's "slot" attribute and slot's "name" attribute.

Let me take another look later.

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

Received on Monday, 11 April 2016 06:13:21 UTC