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

> That sounds precisely like the kind of a use case MutationObserver would address.

As already explained, MutationObserver doesn't trigger anything if the element is already live on the DOM and the custom element is defined after. There are example to test this.
https://github.com/w3c/webcomponents/issues/551#issuecomment-429262811

> Also, it's wrong to assume that child nodes would be inserted once and never change. 

Nobody assumes that, we need a way to setup once the custom element. The constructor is not a good place to setup a custom element if it doesn't use shadow dom and would like to initialize or parse/understand/query/use its content.

> Scripts can totally remove & add more child nodes later on so you'd have to have MutationObserver to observe those changes anyway.

You keep ignoring the issue: **how to setup a custom element**.

We can talk forever DOM can change, we all know this, it's a useless discussion.

Nobody knows how to setup a custom element though, in a way that works with definitions already known, loaded on demand, or procedural.

-- 
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-429521861

Received on Saturday, 13 October 2018 08:21:42 UTC