Open olange opened 5 years ago
Some sort of guarantee on custom element lifecycle order of events
https://github.com/w3c/webcomponents/issues/737:
class ElementOne extends HTMLElement {
async connectedCallback() {
await customElements.whenDefined(ElementTwo.localName)
}
}
or use Mutation Observer API.
Features
customElements.whenDefined()
and/orquerySelectorAll(':not(:defined)')
)See also
9 Create ‹three-view› element