Re: [whatwg/dom] Shadow: Specify when `slotchange` fires (#447)

WebKit's behavior is not to fire `slotchange` on a newly created slot when the slot got assigned of nodes as it got inserted into the tree as I mentioned in https://github.com/w3c/webcomponents/issues/288#issuecomment-206791125. I don't know Chrome fires only in demo1 but not in demo2.

Here's my thought.

 1. Other DOM events such as `change` don't fire when the initial value is set.
 2. A well written component probably have an efficient code path for when it's constructing shadow tree instead of relying on `slotchange` event

Firing `slotchange` event when `slot` is inserted would make (2) harder because now we have to remember to ignore the very first `slotchange` being fired. So I'm still slightly inclined towards not firing for the initial insertion.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/447#issuecomment-300383890

Received on Wednesday, 10 May 2017 06:07:55 UTC