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

@rniwa it seems to me that the combination of `childrenChangedCallback`, `customElements.whenDefined()`, plus some bookkeeping is all you need for that. Though perhaps if the bookkeeping gets too complicated there is some kind of shortcut we could offer if libraries all end up with something similar. (Seems like something user land should figure out the pattern first for though.) Also, @domenic has a point though that https://github.com/whatwg/dom/issues/305 perhaps should be flushed out first given that we're likely not able to get rid of mutation events. Nevertheless, iIt might still make sense to offer a `childrenChangedCallback` given its similar timing and more idiomatic custom element API.

@franktopel it was decided early on that we wanted to encourage custom elements that behave equivalently to built-in elements and would therefore not add hooks that built-in elements do not have. It might be a little tricky to find a definitive reference for that, but that's best discussed separately from this thread in a new issue.

-- 
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/809#issuecomment-488992140

Received on Friday, 3 May 2019 07:54:06 UTC