diff --git a/source b/source index bf1829c760f..2a8643b1be2 100644 --- a/source +++ b/source @@ -70884,6 +70884,7 @@ document.body.append(parent); interface CustomElementRegistry { [CEReactions] undefined define(DOMString name, CustomElementConstructor constructor, optional ElementDefinitionOptions options = {}); (CustomElementConstructor or undefined) get(DOMString name); + DOMString? getName(CustomElementConstructor constructor); Promise<CustomElementConstructor> whenDefined(DOMString name); [CEReactions] undefined upgrade(Node root); }; @@ -70916,8 +70917,8 @@ dictionary ElementDefinitionOptions {
window.customElements.define(name, constructor)
-
Defines a new custom element, mapping the given name to the given constructor as - an autonomous custom element.
+
Defines a new custom element, mapping the given name to the given constructor + as an autonomous custom element.
window.customElements.define(name, constructor, @@ -70934,6 +70935,11 @@ dictionary ElementDefinitionOptions {
Retrieves the custom element constructor defined for the given name. Returns undefined if there is no custom element definition with the given name.
+
window.customElements.getName(constructor)
+ +
Retrieves the given name for a custom element defined for the given constructor. Returns null if there is no + custom element definition with the given constructor.
+
window.customElements.whenDefined(name)
Returns a promise that will be fulfilled with the custom element's constructor @@ -71173,6 +71179,19 @@ dictionary ElementDefinitionOptions {
  • Otherwise, return undefined.

  • +

    The getName(constructor) method + steps are:

    + +
      +
    1. If this CustomElementRegistry contains an entry with constructor + constructor, then return that entry's name.

    2. + +
    3. Return null.

    4. +
    +

    When invoked, the whenDefined(name) method must run these steps:

    @@ -139382,6 +139401,7 @@ INSERT INTERFACES HERE 葛依寧 (Kat Hackett), Kathy Walton, 河童エクマ(Kawarabe Ecma) + Keith Cirkel, Keith Rollin, Keith Yeung, Kelly Ford,