diff --git a/dom.bs b/dom.bs index 09595a60..491e2691 100644 --- a/dom.bs +++ b/dom.bs @@ -42,8 +42,9 @@ urlPrefix: https://w3c.github.io/hr-time/#; spec: HR-TIME @@ -2829,10 +2830,24 @@ before a child, with an optional suppress observers flag, run
  1. Run the insertion steps with inclusiveDescendant. +

  2. If inclusiveDescendant is not connected, then + continue. +

  3. -

    If inclusiveDescendant is connected: +

    If inclusiveDescendant is an element:

      +
    1. If inclusiveDescendant's custom element registry is + null, then set inclusiveDescendant's custom element registry to + the result of looking up a custom element registry given + inclusiveDescendant's parent. + +

    2. Otherwise, if inclusiveDescendant's + custom element registry's is scoped is + true, append inclusiveDescendant's node document to + inclusiveDescendant's custom element registry's + scoped document set. +

    3. If inclusiveDescendant is custom, then enqueue a custom element callback reaction with inclusiveDescendant, callback name "connectedCallback", and « ». @@ -2845,9 +2860,27 @@ before a child, with an optional suppress observers flag, run connectedCallback will be enqueued automatically during the upgrade an element algorithm.

    -
  4. + +
  5. +

    Otherwise, if inclusiveDescendant is a shadow root: + +

      +
    1. If inclusiveDescendant's custom element registry is + null and inclusiveDescendant's + keep custom element registry null is false, then set + inclusiveDescendant's custom element registry to the result + of looking up a custom element registry given inclusiveDescendant's + host. + +

    2. Otherwise, if inclusiveDescendant's + custom element registry is non-null and + inclusiveDescendant's custom element registry's + is scoped is true, append + inclusiveDescendant's node document to + inclusiveDescendant's custom element registry's + scoped document set. +

-
  • If suppress observers flag is unset, then queue a tree mutation record for @@ -3267,12 +3300,31 @@ otherwise, if there is no such element, null.

     interface mixin DocumentOrShadowRoot {
    +  readonly attribute CustomElementRegistry? customElementRegistry;
     };
     Document includes DocumentOrShadowRoot;
     ShadowRoot includes DocumentOrShadowRoot;
     
    -

    The {{DocumentOrShadowRoot}} mixin is expected to be used by other +

    +
    registry = documentOrShadowRoot . {{DocumentOrShadowRoot/customElementRegistry}} +

    Returns documentOrShadowRoot's {{CustomElementRegistry}} object, if any; + otherwise null. +

    + +

    The customElementRegistry getter steps +are: + +

      +
    1. If this is a document, then return this's + custom element registry. + +

    2. Assert: this is a {{ShadowRoot}} node. + +

    3. Return this's custom element registry. +

    + +

    The {{DocumentOrShadowRoot}} mixin is also expected to be used by other standards that want to define APIs shared between documents and shadow roots. @@ -4703,15 +4755,17 @@ and <{template}>. SVG ought to do the same for its <{script}> elements, but does

    To clone a node given a node node and an optional document document (default node's node document), boolean -subtree (default false), and -node-or-null parent (default null): +subtree (default false), node-or-null +parent (default null), and null or a +{{CustomElementRegistry}} object fallbackRegistry +(default null):

    1. Assert: node is not a document or node is document. -

    2. Let copy be the result of cloning a single node given node and - document. +

    3. Let copy be the result of cloning a single node given node, + document, and fallbackRegistry.

    4. Run any cloning steps defined for node in other applicable specifications and pass node, copy, and @@ -4723,8 +4777,9 @@ and an optional document docume

    5. If subtree is true, then for each child of node's children, in tree order: clone a node given child with document set to document, - subtree set to subtree, and - parent set to copy. + subtree set to subtree, + parent set to copy, and + fallbackRegistry set to fallbackRegistry.

    6. If node is an element, node is a @@ -4734,20 +4789,28 @@ and an optional document docume

      1. Assert: copy is not a shadow host. +

      2. Let shadowRootRegistry be node's shadow root's + custom element registry. +

      3. Attach a shadow root with copy, node's shadow root's mode, true, node's shadow root's serializable, node's - shadow root's delegates focus, and node's - shadow root's slot assignment. + shadow root's delegates focus, node's + shadow root's slot assignment, and + shadowRootRegistry.

      4. Set copy's shadow root's declarative to node's shadow root's declarative. -

      5. For each child of node's shadow root's - children, in tree order: clone a node given child with - document set to document, - subtree set to subtree, and - parent set to copy's shadow root. +

      6. +

        For each child of node's shadow root's + children, in tree order: clone a node given child with + document set to document, + subtree set to subtree, and + parent set to copy's shadow root. + +

        This intentionally does not pass the + fallbackRegistry argument.

    7. Return copy. @@ -4755,8 +4818,9 @@ and an optional document docume

      -

      To clone a single node given a node node and -document document: +

      To clone a single node given a node node, +document document, and null or a {{CustomElementRegistry}} object +fallbackRegistry:

      1. Let copy be null. @@ -4765,10 +4829,15 @@ and an optional document docume

        If node is an element:

          +
        1. Let registry be node's custom element registry. + +

        2. If registry is null, then set registry to + fallbackRegistry. +

        3. Set copy to the result of creating an element, given document, node's local name, node's - namespace, node's namespace prefix, and - node's is value. + namespace, node's namespace prefix, + node's is value, false, and registry.

        4. For each attribute of node's @@ -4776,7 +4845,7 @@ and an optional document docume

          1. Let copyAttribute be the result of cloning a single node given - attribute and document. + attribute, document, and null.

          2. Append copyAttribute to copy.

          @@ -4790,8 +4859,10 @@ and an optional document docume
          {{Document}}

          Set copy's encoding, content type, - URL, origin, type, and - mode to those of node. + URL, origin, type, + mode, and custom element registry to those of + node. +

          {{DocumentType}}

          Set copy's name, public ID, and @@ -5306,7 +5377,7 @@ interface Document : Node { [NewObject] Comment createComment(DOMString data); [NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data); - [CEReactions, NewObject] Node importNode(Node node, optional boolean subtree = false); + [CEReactions, NewObject] Node importNode(Node node, optional (boolean or ImportNodeOptions) options = false); [CEReactions] Node adoptNode(Node node); [NewObject] Attr createAttribute(DOMString localName); @@ -5325,8 +5396,14 @@ interface Document : Node { interface XMLDocument : Document {}; dictionary ElementCreationOptions { + CustomElementRegistry customElementRegistry; DOMString is; }; + +dictionary ImportNodeOptions { + CustomElementRegistry customElementRegistry; + boolean selfOnly = false; +};

          {{Document}} nodes are simply @@ -5340,8 +5417,9 @@ known as documents. URL (a URL), origin (an origin), type ("xml" or "html"), -mode ("no-quirks", "quirks", or "limited-quirks"), and -allow declarative shadow roots (a boolean). +mode ("no-quirks", "quirks", or "limited-quirks"), +allow declarative shadow roots (a boolean), and +custom element registry (null or a {{CustomElementRegistry}} object). [[!ENCODING]] [[!URL]] [[!HTML]] @@ -5351,7 +5429,8 @@ known as documents. "application/xml", URL is "about:blank", origin is an opaque origin, type is "xml", mode is -"no-quirks", and its allow declarative shadow roots is false. +"no-quirks", allow declarative shadow roots is false, and +custom element registry is null.

          A document is said to be an XML document if its type is "xml"; otherwise an HTML document. @@ -5548,12 +5627,19 @@ method steps are to return the list of elements with class names classNa document is an HTML document or document's content type is "application/xhtml+xml"; otherwise null. -

          If localName does not match the Name production an - "{{InvalidCharacterError!!exception}}" {{DOMException}} will be thrown. +

          When supplied, options's {{ElementCreationOptions/customElementRegistry}} can be + used to set the {{CustomElementRegistry}}.

          When supplied, options's {{ElementCreationOptions/is}} can be used to create a customized built-in element. +

          If localName does not match the Name production an + "{{InvalidCharacterError!!exception}}" {{DOMException}} will be thrown. + +

          When both options's {{ElementCreationOptions/customElementRegistry}} and + options's {{ElementCreationOptions/is}} are supplied, a + "{{NotSupportedError!!exception}}" {{DOMException}} will be thrown. +

          element = document . createElementNS(namespace, qualifiedName [, options])
          @@ -5562,6 +5648,12 @@ method steps are to return the list of elements with class names classNa qualifiedName or null. Its local name will be everything after U+003A (:) in qualifiedName or qualifiedName. +

          When supplied, options's {{ElementCreationOptions/customElementRegistry}} can be + used to set the {{CustomElementRegistry}}. + +

          When supplied, options's {{ElementCreationOptions/is}} can be used to create a + customized built-in element. +

          If qualifiedName does not match the QName production an "{{InvalidCharacterError!!exception}}" {{DOMException}} will be thrown. @@ -5584,8 +5676,9 @@ method steps are to return the list of elements with class names classNa is "xmlns". -

          When supplied, options's {{ElementCreationOptions/is}} can be used to create a - customized built-in element. +

          When both options's {{ElementCreationOptions/customElementRegistry}} and + options's {{ElementCreationOptions/is}} are supplied, a + "{{NotSupportedError!!exception}}" {{DOMException}} will be thrown.

          documentFragment = document . {{createDocumentFragment()}}
          Returns a {{DocumentFragment}} node. @@ -5631,18 +5724,15 @@ method steps are:
        5. If this is an HTML document, then set localName to localName in ASCII lowercase. -

        6. Let is be null. - -

        7. If options is a dictionary and - options["{{ElementCreationOptions/is}}"] exists, then set is - to it. +

        8. Let registry and is be the result of + flattening element creation options given options and this.

        9. Let namespace be the HTML namespace, if this is an HTML document or this's content type is "application/xhtml+xml"; otherwise null.

        10. Return the result of creating an element given this, localName, - namespace, null, is, and true. + namespace, null, is, true, and registry.

        The internal createElementNS steps, given document, @@ -5652,14 +5742,12 @@ method steps are:

      2. Let namespace, prefix, and localName be the result of passing namespace and qualifiedName to validate and extract. -

      3. Let is be null. - -

      4. If options is a dictionary and - options["{{ElementCreationOptions/is}}"] exists, then set is - to it. +

      5. Let registry and is be the result of + flattening element creation options given options and this.

      6. Return the result of creating an element given document, - localName, namespace, prefix, is, and true. + localName, namespace, prefix, is, true, and + registry.

      The @@ -5668,6 +5756,34 @@ method steps are to return the result of running the internal createElementNS steps, given this, namespace, qualifiedName, and options. +

      To flatten element creation options, given a string or {{ElementCreationOptions}} +dictionary options and a document document: + +

        +
      1. Let registry be null. + +

      2. Let is be null. + +

      3. +

        If options is a dictionary: + +

          +
        1. If options["{{ElementCreationOptions/customElementRegistry}}"] + exists, then set registry to it. + +

        2. If options["{{ElementCreationOptions/is}}"] exists, then set + is to it. + +

        3. If registry is non-null and is is non-null, then throw a + "{{NotSupportedError!!exception}}" {{DOMException}}. +

        + +
      4. If registry is null, then set registry to the result of + looking up a custom element registry given document. + +

      5. Return registry and is. +

      +

      {{Document/createElement()}} and {{Document/createElementNS()}}'s options parameter is allowed to be a string for web compatibility. @@ -5733,11 +5849,15 @@ method steps are:


      -
      clone = document . importNode(node [, subtree = false]) +
      clone = document . importNode(node [, options = false])
      -

      Returns a copy of node. If subtree is true, the copy also includes the +

      Returns a copy of node. If options is true or options is a + dictionary whose {{ImportNodeOptions/selfOnly}} is false, the copy also includes the node's descendants. +

      options's {{ImportNodeOptions/customElementRegistry}} can be used to set the + {{CustomElementRegistry}} of elements that have none. +

      If node is a document or a shadow root, throws a "{{NotSupportedError!!exception}}" {{DOMException}}. @@ -5753,16 +5873,37 @@ method steps are:

      -

      The importNode(node, subtree) +

      The importNode(node, options) method steps are:

      1. If node is a document or shadow root, then throw a "{{NotSupportedError!!exception}}" {{DOMException}}. +

      2. Let subtree be false. + +

      3. Let registry be null. + +

      4. If options is a boolean, then set subtree to options. + +

      5. +

        Otherwise: + +

          +
        1. Set subtree to the negation of + options["{{ImportNodeOptions/selfOnly}}"]. + +

        2. If options["{{ImportNodeOptions/customElementRegistry}}"] + exists, then set registry to it. +

        + +
      6. If registry is null, then set registry to the result of + looking up a custom element registry given this. +

      7. Return the result of cloning a node given node with - document set to this and - subtree set to subtree. + document set to this, + subtree set to subtree, and + fallbackRegistry set to registry.

      @@ -6207,6 +6348,7 @@ interface ShadowRoot : DocumentFragment { readonly attribute boolean clonable; readonly attribute boolean serializable; readonly attribute Element host; + attribute EventHandler onslotchange; }; @@ -6217,22 +6359,23 @@ enum SlotAssignmentMode { "manual", "named" };

      {{ShadowRoot}} nodes are simply known as shadow roots. +

      Shadow roots's associated host is never null.

      + +

      Shadow roots have an associated mode ("open" or "closed").

      -

      Shadow roots have an associated delegates focus. -It is initially set to false.

      +

      Shadow roots have an associated delegates focus +(a boolean). It is initially set to false.

      Shadow roots have an associated -available to element internals. It is initially set to false.

      +available to element internals (a boolean). It is initially set to +false.

      Shadow roots have an associated declarative (a boolean). It is initially set to false.

      -

      Shadow roots's associated host is never null.

      - -

      Shadow roots have an associated slot assignment ("manual" or "named"). @@ -6242,12 +6385,26 @@ It is initially set to false.

      Shadow roots have an associated serializable (a boolean). It is initially set to false.

      +

      Shadow roots have an associated custom element registry +(null or a {{CustomElementRegistry}} object). It is initially null.

      + +

      Shadow roots have an associated +keep custom element registry null (a boolean). It is initially false. + +

      This can only ever be true in combination with declarative shadow roots. And it only +matters for as long as the shadow root's custom element registry +is null. + +


      +

      A shadow root's get the parent algorithm, given an event, returns null if event's composed flag is unset and shadow root is the root of event's path's first struct's invocation target; otherwise shadow root's host. +


      +

      The mode getter steps are to return this's mode.

      @@ -6266,6 +6423,8 @@ null if event's composed flag is unset and shadow roo

      The host getter steps are to return this's host. +


      +

      The onslotchange attribute is an event handler IDL attribute for the onslotchange event handler, whose @@ -6378,6 +6537,8 @@ interface Element : Node { ShadowRoot attachShadow(ShadowRootInit init); readonly attribute ShadowRoot? shadowRoot; + readonly attribute CustomElementRegistry? customElementRegistry; + Element? closest(DOMString selectors); boolean matches(DOMString selectors); boolean webkitMatchesSelector(DOMString selectors); // legacy alias of .matches @@ -6396,28 +6557,46 @@ dictionary ShadowRootInit { SlotAssignmentMode slotAssignment = "named"; boolean clonable = false; boolean serializable = false; + CustomElementRegistry customElementRegistry; };

      {{Element}} nodes are simply known as elements. -

      Elements have an associated -namespace, -namespace prefix, -local name, -custom element state, -custom element definition, -is value. When an -element is created, all of these values are +

      Elements have an associated: + +

      +
      namespace +
      Null or a non-empty string. + +
      namespace prefix +
      Null or a non-empty string. + +
      local name +
      A non-empty string. + +
      custom element registry +
      Null or a {{CustomElementRegistry}} object. + +
      custom element state +
      "undefined", "failed", "uncustomized", + "precustomized", or "custom". + +
      custom element definition +
      Null or a custom element definition. + +
      is value +
      Null or a valid custom element name. +
      + +

      When an element is created, all of these values are initialized. -

      An element's custom element state is one of -"undefined", "failed", "uncustomized", -"precustomized", or "custom". An element whose -custom element state is "uncustomized" or "custom" is -said to be defined. An element -whose custom element state is "custom" is said to be +

      An element whose custom element state is +"uncustomized" or "custom" is said to be +defined. An element whose +custom element state is "custom" is said to be custom.

      Whether or not an element is defined is used to determine the @@ -6490,14 +6669,18 @@ value of these steps:

      To create an element, given a document document, string localName, string-or-null namespace, and optionally a string-or-null prefix (default null), string-or-null is (default -null), and boolean synchronousCustomElements (default false): +null), boolean synchronousCustomElements (default false), and "default", +null, or a {{CustomElementRegistry}} object registry (default "default"):

      1. Let result be null. +

      2. If registry is "default", then set registry to the result + of looking up a custom element registry given document. +

      3. Let definition be the result of - looking up a custom element definition given - document, namespace, localName, and is. + looking up a custom element definition given registry, + namespace, localName, and is.

      4. If definition is non-null, and definition's @@ -6509,13 +6692,9 @@ null), and boolean synchronousCustomElements (default false):

      5. Let interface be the element interface for localName and the HTML namespace. -

      6. Set result to a new element that implements interface, - with no attributes, namespace set to the HTML namespace, - namespace prefix set to prefix, local name set - to localName, custom element state set to "undefined", - custom element definition set to null, - is value set to is, and node document set to - document. +

      7. Set result to the result of creating an element internal given + document, interface, localName, the HTML namespace, + prefix, "undefined", is, and registry.

      8. If synchronousCustomElements is true, then run this step while catching any @@ -6547,74 +6726,81 @@ null), and boolean synchronousCustomElements (default false):

        1. -

          If synchronousCustomElements is true, then run these steps while catching any - exceptions: +

          If synchronousCustomElements is true:

          1. Let C be definition's constructor. -

          2. Set result to the result of constructing C, with no - arguments. - -

          3. Assert: result's custom element state and - custom element definition are initialized. +

          4. Set the surrounding agent's + active custom element constructor map[C] to + registry.

          5. -

            Assert: result's namespace is the HTML namespace. +

            Run these steps while catching any exceptions: -

            IDL enforces that result is an {{HTMLElement}} object, which all use - the HTML namespace. +

              +
            1. Set result to the result of constructing C, with no + arguments. -

            2. If result's attribute list is not empty, - then throw a "{{NotSupportedError!!exception}}" {{DOMException}}. +

            3. Assert: result's custom element state and + custom element definition are initialized. -

            4. If result has children, then throw a - "{{NotSupportedError!!exception}}" {{DOMException}}. +

            5. +

              Assert: result's namespace is the HTML namespace. -

            6. If result's parent is not null, then throw a - "{{NotSupportedError!!exception}}" {{DOMException}}. +

              IDL enforces that result is an {{HTMLElement}} object, which all + use the HTML namespace. -

            7. If result's node document is not document, then - throw a "{{NotSupportedError!!exception}}" {{DOMException}}. +

            8. If result's attribute list is not empty, + then throw a "{{NotSupportedError!!exception}}" {{DOMException}}. -

            9. If result's local name is not equal to - localName, then throw a "{{NotSupportedError!!exception}}" {{DOMException}}. +

            10. If result has children, then throw a + "{{NotSupportedError!!exception}}" {{DOMException}}. -

            11. Set result's namespace prefix to prefix. +

            12. If result's parent is not null, then throw a + "{{NotSupportedError!!exception}}" {{DOMException}}. -

            13. Set result's is value to null. -

            +
          6. If result's node document is not document, then + throw a "{{NotSupportedError!!exception}}" {{DOMException}}. -

            If any of these steps threw an exception exception: +

          7. If result's local name is not equal to + localName, then throw a "{{NotSupportedError!!exception}}" {{DOMException}}. -

              -
            1. Report exception for definition's - constructor's corresponding JavaScript object's - associated realm's global object. +

            2. Set result's namespace prefix to prefix. + +

            3. Set result's is value to null. + +

            4. Set result's custom element registry to + registry. +

            + +

            If any of these steps threw an exception exception: + +

              +
            1. Report exception for + definition's constructor's corresponding + JavaScript object's associated realm's global object. + +

            2. Set result to the result of creating an element internal given + document, {{HTMLUnknownElement}}, localName, the HTML namespace, + prefix, "failed", null, and registry. +

            + +
          8. +

            Remove the surrounding agent's + active custom element constructor map[C]. -

          9. Set result to a new element that implements the - {{HTMLUnknownElement}} interface, with no attributes, namespace set to the - HTML namespace, namespace prefix set to prefix, - local name set to localName, - custom element state set to "failed", - custom element definition set to null, - is value set to null, and node document set to - document. +

            Under normal circumstances it will already have been removed at this point.

          -
        2. Otherwise:

            -
          1. Set result to a new element that implements the {{HTMLElement}} - interface, with no attributes, namespace set to the HTML namespace, - namespace prefix set to prefix, local name set - to localName, custom element state set to - "undefined", custom element definition set to null, - is value set to null, and node document set to - document. +

          2. Set result to the result of creating an element internal given + document, {{HTMLElement}}, localName, the HTML namespace, + prefix, "undefined", null, and registry.

          3. Enqueue a custom element upgrade reaction given result and definition. @@ -6630,13 +6816,9 @@ null), and boolean synchronousCustomElements (default false):

          4. Let interface be the element interface for localName and namespace. -

          5. Set result to a new element that implements interface, - with no attributes, namespace set to namespace, - namespace prefix set to prefix, local name set - to localName, custom element state set to - "uncustomized", custom element definition set to null, - is value set to is, and node document set to - document. +

          6. Set result to the result of creating an element internal given + document, interface, localName, namespace, + prefix, "uncustomized", is, and registry.

          7. If namespace is the HTML namespace, and either localName is a valid custom element name or is is non-null, then set result's @@ -6647,6 +6829,26 @@ null), and boolean synchronousCustomElements (default false):

          8. Return result.

          +

          To create an element internal given a document document, an +interface interface a string localName, a string-or-null namespace, +a string-or-null prefix, a string state, a string-or-null is, and +null or a {{CustomElementRegistry}} object registry: + +

            +
          1. Let element be a new element that implements interface, + with namespace set to namespace, namespace prefix + set to prefix, local name set to localName, + custom element registry set to registry, + custom element state set to state, + custom element definition set to null, is value + set to is, and node document set to document. + +

          2. Assert: element's attribute list + is empty. + +

          3. Return element. +

          +

          Elements also have an attribute list, which is a list exposed through a {{NamedNodeMap}}. Unless explicitly given when an @@ -7217,12 +7419,12 @@ are:


          -
          var shadow = element . {{attachShadow(init)}} +
          shadow = element . {{attachShadow(init)}}

          Creates a shadow root for element and returns it. -

          var shadow = element . {{shadowRoot}} +
          shadow = element . {{shadowRoot}}

          Returns element's shadow root, if any, and if - shadow root's mode is "open", and null otherwise. + shadow root's mode is "open"; otherwise null.

          A valid shadow host name is: @@ -7253,11 +7455,16 @@ are:

          The attachShadow(init) method steps are:

            +
          1. Let registry be this's custom element registry. + +

          2. If init["{{ShadowRootInit/customElementRegistry}}"] exists, then + set registry to it. +

          3. Run attach a shadow root with this, init["{{ShadowRootInit/mode}}"], init["{{ShadowRootInit/clonable}}"], init["{{ShadowRootInit/serializable}}"], - init["{{ShadowRootInit/delegatesFocus}}"], and - init["{{ShadowRootInit/slotAssignment}}"]. + init["{{ShadowRootInit/delegatesFocus}}"], + init["{{ShadowRootInit/slotAssignment}}"], and registry.

          4. Return this's shadow root.

          @@ -7266,8 +7473,8 @@ are:

          To attach a shadow root, given an element element, a string mode, a boolean clonable, -a boolean serializable, a boolean delegatesFocus, and a string -slotAssignment: +a boolean serializable, a boolean delegatesFocus, a string +slotAssignment, and null or a {{CustomElementRegistry}} object registry:

          1. If element's namespace is not the HTML namespace, @@ -7282,10 +7489,10 @@ a boolean serializable, a boolean delegatesFocus, and a st element's is value is non-null:

              -
            1. Let definition be the result of - looking up a custom element definition given - element's node document, its namespace, its - local name, and its is value. +

            2. Let definition be the result of looking up a custom element definition + given element's custom element registry, its + namespace, its local name, and its + is value.

            3. If definition is not null and definition's disable shadow is true, then throw a @@ -7341,6 +7548,9 @@ a boolean serializable, a boolean delegatesFocus, and a st

            4. Set shadow's serializable to serializable. +

            5. Set shadow's custom element registry to + registry. +

            6. Set element's shadow root to shadow.

          @@ -7360,6 +7570,18 @@ a boolean serializable, a boolean delegatesFocus, and a st
          +
          +
          registry = element . {{Element/customElementRegistry}} +

          Returns element's {{CustomElementRegistry}} object, if any; otherwise null. +

          + +
          +

          The customElementRegistry getter steps are to +return this's custom element registry. +

          + +
          +
          element . {{closest(selectors)}}
          Returns the first (starting at element)