Re: [w3c/webcomponents] Custom Element definition ordering can cause difficult-to-find bugs. (#668)

Lastly, for reference, my actual `connectedCallback` looks something like the following in order do something with children of the element that has `connectedCallback` fired:

```js
connectedCallback() {

    //setTimeout(() => {
    //Promise.resolve().then(() => {
    documentReady().then(() => {

        const children = this.childNodes
        if (children.length) {

            for (let l=children.length, i=0; i<l; i+=1) {
                this.childConnectedCallback(children[i])
            }
        }

    })
    //}, 0)
}
```

-- 
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/668#issuecomment-334992255

Received on Sunday, 8 October 2017 08:49:12 UTC