Re: [w3c/webcomponents] Non-class based example of customElement.define() (#587)

> The recommended paradigm is for each child custom element to notify its parent.
Is there any implementation or wrapper to handle after my child components are ready and attached? MutationObserver is not something which completes my requirement. At present I am having `setTimeOut` in my base component class like following which runs `ready` method only once. But this doesn't seem to be correct way.

```
connectedCallback() {
   if (!this.isCustomInitialized) setTimeOut(()=>{this.ready()}, 0);
   this.isCustomInitialized = true;
}
ready() {
// write code which runs after children custom components are ready with shadowDOM
}
```


-- 
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/587#issuecomment-448500999

Received on Wednesday, 19 December 2018 07:51:04 UTC