Re: [WICG/webcomponents] Need a callback for when children changed or parser finished parsing children (#809)

> [XTF](https://searchfox.org/mozilla-esr17/rev/8f40560c89d23744d3f149894037773b294837e7/content/xtf/public/nsIXTFElement.idl#104) (which with XBL was like web components on steroids) had a notification to tell when all the child nodes had been added to it during parsing. And that notification was very useful to implement new elements.

Thanks for the reference!

> I don't yet have an opinion on whether some notification should come through MutationObserver or whether Custom Elements should have a callback. Children changed callback on a custom element might be rather slow if it was using CEReaction-type of timing during parsing - that would be basically the opposite why microtasks were created for MutationObserver. But then, on the other hand there is already attributeChangedCallback....

One point is that there [seem to be use cases](https://github.com/WICG/webcomponents/issues/809#issuecomment-1755787377) that don't involve custom elements, and it'd be nice to be able to solve those. So if there's a general solution (which I think MutationObserver represents), that would seem better to me. An async event would also do the trick.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/809#issuecomment-1857084616
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/809/1857084616@github.com>

Received on Friday, 15 December 2023 00:35:52 UTC