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

> connectedCallback simply fires when the element is inserted into the DOM, and at that time, there are no children.

```html
<my-el>
  <p>child 0</p>
  <p>child 1</p>
</my-el>
<script>
customElements.define('my-el', class extends HTMLElement {
  connectedCallback() {
    console.log(this.children);
  }
});
</script>
```

If I understand correctly the current status, it's hard to explain it, with or without a blog post, that there are no children in above situation.

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

Received on Thursday, 25 August 2016 20:52:49 UTC