CustomElementRegistry

The CustomElementRegistry interface provides methods for registering custom elements and querying registered elements.

MDN Reference

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun <T : P, P : HTMLElement> define(name: TagName<T>, constructor: CustomElementConstructor<T>, options: ElementDefinitionOptions<P> = definedExternally)

The define() method of the CustomElementRegistry interface adds a definition for a custom element to the custom element registry, mapping its name to the constructor which will be used to create it.

Link copied to clipboard

The define() method of the CustomElementRegistry interface adds a definition for a custom element to the custom element registry, mapping its name to the constructor which will be used to create it.

Link copied to clipboard

The get() method of the CustomElementRegistry interface returns the constructor for a previously-defined custom element.

Link copied to clipboard

The getName() method of the CustomElementRegistry interface returns the name for a previously-defined custom element.

Link copied to clipboard

The getName() method of the CustomElementRegistry interface returns the name for a previously-defined custom element.

Link copied to clipboard
fun upgrade(root: Node)

The upgrade() method of the CustomElementRegistry interface upgrades all shadow-containing custom elements in a Node subtree, even before they are connected to the main document.

Link copied to clipboard

The whenDefined() method of the CustomElementRegistry interface returns a Promise that resolves when the named element is defined.

Link copied to clipboard

The whenDefined() method of the CustomElementRegistry interface returns a Promise that resolves when the named element is defined.