CustomElementRegistry extension type

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


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

define(String name, CustomElementConstructor constructor, [ElementDefinitionOptions options]) → void
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.
get(String name) CustomElementConstructor?
The get() method of the CustomElementRegistry interface returns the constructor for a previously-defined custom element.
getName(CustomElementConstructor constructor) String?
The getName() method of the CustomElementRegistry interface returns the name for a previously-defined custom element.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upgrade(Node root) → 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.
whenDefined(String name) JSPromise<CustomElementConstructor>
The whenDefined() method of the CustomElementRegistry interface returns a Promise that resolves when the named element is defined.

Operators

operator ==(Object other) bool
The equality operator.
inherited