- From: Joe Pea <notifications@github.com>
- Date: Wed, 21 Feb 2018 21:16:33 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 22 February 2018 05:17:18 UTC
> This is by design. So you design robust components that can be created imperatively. This is mostly a problem when creating them declaratively: they start in HTML, then parsed, and depending on various factors, children (of an element with child-observing logic) may or may not be upgraded inside of (for example) the observing-element's `connectedCallback` invocation. When I create elements imperatively, this problem doesn't exist in my cases. > .whenRegistered(CustomElementConstructor) That would be helpful, then we don't need to care what the elements are named! Something like `.get(Constructor)` could help too (returns string or undefined) to avoid async when possible: ```js if (!customElements.get(SomeElementConstructor)) await customElements.whenDefined(SomeElementConstructor) ``` -- 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/737#issuecomment-367570206
Received on Thursday, 22 February 2018 05:17:18 UTC