window.CustomElementRegistry
See: Refer Web APIs - CustomElementRegistry
define(name, constructor, options)
Defines a new custom element.
See
Param
Type
Description
name
stringName for the new custom element
constructor
CustomElementConstructor for the new custom element
options
ObjectObject that controls how the element is defined
options.extends
stringThe name of a built-in element to extend
get(name)
Returns the constructor for the named custom element
See: CustomElementRegistry - get
Param
Type
Description
name
stringThe name of the custom element
upgrade(root)
Upgrade all potential custom elements under tree rooted at 'root'.
[ This feature is behind a feature flag. You must turn on enableSWCSupport in the featureFlags section of plugin manifest to use the same ]
See: CustomElementRegistry - upgrade
Param
Description
root
Node instance with shadow-containing descendant elements to upgrade
whenDefined(name)
Returns a Promise that resolves when the named custom-element is defined.
[ This feature is behind a feature flag. You must turn on enableSWCSupport in the featureFlags section of plugin manifest to use the same ]
See: CustomElementRegistry - whenDefined
Param
Type
Description
name
stringThe name of the custom element