diff --git a/dom.bs b/dom.bs index f25976e9..a5f9b88c 100644 --- a/dom.bs +++ b/dom.bs @@ -52,11 +52,9 @@ spec:html; type:element

This specification depends on the Infra Standard. [[!INFRA]]

Some of the terms used in this specification are defined in Encoding, -Selectors, Trusted Types, Web IDL, XML, and -Namespaces in XML. +Selectors, Web IDL, XML, and Namespaces in XML. [[!ENCODING]] [[!SELECTORS4]] -[[!TRUSTED-TYPES]] [[!WEBIDL]] [[!XML]] [[!XML-NAMES]] @@ -3120,9 +3118,8 @@ standards that want to define APIs shared between documents and

Mixin {{ParentNode}}

-

To convert nodes into a node, given a -node parent, list of nodes nodes, and -document document: +

To convert nodes into a node, given +nodes and document, run these steps:

  1. Let node be null. @@ -3131,37 +3128,12 @@ standards that want to define APIs shared between documents and data is the string and node document is document. -

  2. Let isScriptElement be true if parent is an {{HTMLScriptElement}} - node; otherwise false. - -

  3. Let newNodes be « ». - -

  4. -

    For each value of nodes: - -

      -
    1. Let newValue be value. - -

    2. If value is a {{Text}} node and isScriptElement is - true, then set newValue to a new {{Text}} node whose - node document is document and data is the - result of calling Get Trusted Type compliant string, with {{TrustedScript}}, - document's relevant global object, value's - data, "HTMLScriptElement text", and "script". - -

    3. If value is a {{TrustedScript}}, then set newValue to a new {{Text}} - node whose data is value's - data and node document is document. - -

    4. Append newValue to newNodes. -

    - -
  5. If newNodes contains one node, then set node to - newNodes[0]. +

  6. If nodes contains one node, then set node to + nodes[0].

  7. Otherwise, set node to a new {{DocumentFragment}} node whose node document is document, and then append each node - in newNodes, if any, to it. + in nodes, if any, to it.

  8. Return node.

@@ -3173,9 +3145,9 @@ interface mixin ParentNode { readonly attribute Element? lastElementChild; readonly attribute unsigned long childElementCount; - [CEReactions, Unscopable] undefined prepend((Node or TrustedScript or DOMString)... nodes); - [CEReactions, Unscopable] undefined append((Node or TrustedScript or DOMString)... nodes); - [CEReactions, Unscopable] undefined replaceChildren((Node or TrustedScript or DOMString)... nodes); + [CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes); + [CEReactions, Unscopable] undefined append((Node or DOMString)... nodes); + [CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes); Element? querySelector(DOMString selectors); [NewObject] NodeList querySelectorAll(DOMString selectors); @@ -3249,8 +3221,8 @@ the number of children of this that are elements

The prepend(nodes) method steps are:

    -
  1. Let node be the result of converting nodes into a node given this, - nodes, and this's node document. +

  2. Let node be the result of converting nodes into a node given + nodes and this's node document.

  3. Pre-insert node into this before this's first child. @@ -3259,8 +3231,8 @@ the number of children of this that are elements

    The append(nodes) method steps are:

      -
    1. Let node be the result of converting nodes into a node given this, - nodes, and this's node document. +

    2. Let node be the result of converting nodes into a node given + nodes and this's node document.

    3. Append node to this.

    @@ -3269,8 +3241,8 @@ the number of children of this that are elements are:
      -
    1. Let node be the result of converting nodes into a node given this, - nodes, and this's node document. +

    2. Let node be the result of converting nodes into a node given + nodes and this's node document.

    3. Ensure pre-insertion validity of node into this before null. @@ -3325,9 +3297,9 @@ steps are to return the first following sibling that is a

       interface mixin ChildNode {
      -  [CEReactions, Unscopable] undefined before((Node or TrustedScript or DOMString)... nodes);
      -  [CEReactions, Unscopable] undefined after((Node or TrustedScript or DOMString)... nodes);
      -  [CEReactions, Unscopable] undefined replaceWith((Node or TrustedScript or DOMString)... nodes);
      +  [CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
      +  [CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
      +  [CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
         [CEReactions, Unscopable] undefined remove();
       };
       DocumentType includes ChildNode;
      @@ -3375,7 +3347,7 @@ CharacterData includes ChildNode;
        sibling not in nodes; otherwise null.
       
        
    4. Let node be the result of converting nodes into a node, given - parent, nodes, and this's node document. + nodes and this's node document.

    5. If viablePreviousSibling is null, then set it to parent's first child; otherwise to viablePreviousSibling's @@ -3396,7 +3368,7 @@ CharacterData includes ChildNode; sibling not in nodes; otherwise null.

    6. Let node be the result of converting nodes into a node, given - parent, nodes, and this's node document. + nodes and this's node document.

    7. Pre-insert node into parent before viableNextSibling. @@ -3413,7 +3385,7 @@ CharacterData includes ChildNode; sibling not in nodes; otherwise null.

    8. Let node be the result of converting nodes into a node, given - parent, nodes, and this's node document. + nodes and this's node document.

    9. If this's parent is parent, replace this with