Re: [w3c/webcomponents] connectedCallback timing when the document parser creates custom elements (#551)

also @franktopel ...

> this approach is meant to solve the problem that arises from children being unavailable when connectedCallback triggers.

My approach solves every issue. When `parsedCallback` is invoked you will have children in there, if any. If you want to listen to further mutations to children, just add your own Mutation Observed.

> Then how would you address asynchronous adding of child elements?

You don't . You disconnect the observer too so that's not your intent and also you want to `this.childrenAvailableCallback()` once, and once only indeed.

Again, the missing bit that is essential is to know when it's safe to handle children or even inject nodes/html. Once we have that, everything else is trivial.


-- 
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/551#issuecomment-431357863

Received on Friday, 19 October 2018 13:11:17 UTC