Custom elements' registry.

This is used to register custom elements.

Typically, implemented by window.customElements.

Hierarchy

  • CustomElements

Methods

  • Defines custom element.

    Parameters

    • componentTypeOrName: QualifiedName | ComponentClass<any>

      A component class constructor or custom element name. The latter may belong to namespace to avoid naming conflicts.

    • elementType: Class<any>

      A constructor of custom element to define.

    • Optional options: ElementDefinitionOptions

      Custom element definition options.

    Returns void

  • Allows to wait for component definition.

    This corresponds to window.customElements.whenDefined() method.

    Returns

    A promise that is resolved when custom element is registered.

    Throws

    TypeError If componentType does not contain a component definition.

    Parameters

    • componentTypeOrName: QualifiedName | ComponentClass<any>

      Component class constructor or custom element name possibly belonging to some namespace.

    Returns Promise<void>

Generated using TypeDoc