Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface CustomElementRegistry

The CustomElementRegistry interface provides methods for registering custom elements and querying registered elements. To get an instance of it, use the window.customElements property.

MDN Reference

interface CustomElementRegistry {
    define(
        name: string,
        constructor: CustomElementConstructor,
        options?: ElementDefinitionOptions,
    ): void;
    get(name: string): CustomElementConstructor | undefined;
    getName(constructor: CustomElementConstructor): string | null;
    initialize(root: Node): void;
    upgrade(root: Node): void;
    whenDefined(name: string): Promise<CustomElementConstructor>;
}
Index
  • Parameters

    Returns void

  • 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.

    MDN Reference

    Parameters

    Returns void

Was this helpful?