petitatelier / three-web-components

A collection of Web Components to compose Three.js apps
BSD 3-Clause "New" or "Revised" License
44 stars 5 forks source link

Create ‹three-app› basic container and view #2

Open olange opened 5 years ago

olange commented 5 years ago

Features

See also

olange commented 5 years ago

Some sort of guarantee on custom element lifecycle order of events
https://github.com/w3c/webcomponents/issues/737:

customElements.whenDefined()

class ElementOne extends HTMLElement {
    async connectedCallback() {
        await customElements.whenDefined(ElementTwo.localName)
    }
}

or use Mutation Observer API.