- From: Takayoshi Kochi <notifications@github.com>
- Date: Tue, 11 Jul 2017 03:14:48 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 11 July 2017 03:15:22 UTC
I'm just seeing error message on Chrome with the jsbin demo, ``` "error" "TypeError: Illegal constructor at <anonymous>:9:11 at https://static.jsbin.com/js/prod/runner-4.0.4.min.js:1:13850 at https://static.jsbin.com/js/prod/runner-4.0.4.min.js:1:10792" ... ``` So I'm not completely sure the problem you are encountering, but as I understand @annevk's comment, the behavior you are seeing is working as expected. When HTML parser parses a custom element, it connects the parsed custom element after calling its constructor, but before connecting all the children which are not yet parsed. On the other hand, if all the custom elements are parsed but not upgraded (e.g. you put the custom elements in HTML before script that defines the custom element runs), when they are upgraded they can see their children, as they are already parsed and all connected (`.innerHTML` also parses, inserts, and then upgrades them, so you can see children). Closing this as working as expected. -- 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/615#issuecomment-314311154
Received on Tuesday, 11 July 2017 03:15:22 UTC