- From: Ryosuke Niwa <notifications@github.com>
- Date: Tue, 09 May 2017 23:07:21 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 10 May 2017 06:07:55 UTC
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