Re: [w3c/webcomponents] DOM APIs which replace all children end up firing superfluous slotchange events (#764)

@hayatoito : I think implementation / spec just needs to special-case replace-all case, e.g. add a flag to the [concept to remove a node](https://dom.spec.whatwg.org/#concept-node-remove) similar to an optional *suppress observers flag* and skip steps 12, 12.1 and 12.2 which [assign spottables for a tree](https://dom.spec.whatwg.org/#assign-slotables-for-a-tree). *replace all* would then invoke it later.

It would add a slight complexity but I think it's an overall win for developer ergonomics & perf since resolving slots after removing each subtree is very expensive.

-- 
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/764#issuecomment-418883509

Received on Wednesday, 5 September 2018 21:13:56 UTC