Edit in GitHubLog an issue

window.CustomElementRegistry

See: Refer Web APIs - CustomElementRegistry

define(name, constructor, options)

Defines a new custom element.

See

ParamTypeDescription
name
string
Name for the new custom element
constructor
CustomElement
Constructor for the new custom element
options
Object
Object that controls how the element is defined
options.extends
string
The name of a built-in element to extend

get(name)

Returns the constructor for the named custom element

See: CustomElementRegistry - get

ParamTypeDescription
name
string
The 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

ParamDescription
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

ParamTypeDescription
name
string
The name of the custom element
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.