diff --git a/dom.bs b/dom.bs index a0aa0c3d2..f472a3b3c 100644 --- a/dom.bs +++ b/dom.bs @@ -52,9 +52,11 @@ 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, Web IDL, XML, and Namespaces in XML. +Selectors, Trusted Types, Web IDL, XML, and +Namespaces in XML. [[!ENCODING]] [[!SELECTORS4]] +[[!TRUSTED-TYPES]] [[!WEBIDL]] [[!XML]] [[!XML-NAMES]] @@ -3033,8 +3035,9 @@ standards that want to define APIs shared between documents and
To convert nodes into a node, given -nodes and document, run these steps: +
To convert nodes into a node, given a +node parent, list of nodes nodes, and +document document:
Let node be null. @@ -3043,12 +3046,37 @@ standards that want to define APIs shared between documents and data is the string and node document is document. -
If nodes contains one node, then set node to - nodes[0]. +
Let isScriptElement be true if parent is an {{HTMLScriptElement}} + node; otherwise false. + +
Let newNodes be « ». + +
For each value of nodes: + +
Let newValue be value. + +
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
".
+
+
If value is a {{TrustedScript}}, then set newValue to a new {{Text}} + node whose data is value's + data and node document is document. + +
Append newValue to newNodes. +
If newNodes contains one node, then set node to + newNodes[0].
Otherwise, set node to a new {{DocumentFragment}} node whose node document is document, and then append each node - in nodes, if any, to it. + in newNodes, if any, to it.
Return node.
The prepend(nodes)
method steps are:
Let node be the result of converting nodes into a node given - nodes and this's node document. +
Let node be the result of converting nodes into a node given this, + nodes, and this's node document.
Pre-insert node into this before this's
first child.
@@ -3146,8 +3174,8 @@ the number of children of this that are elements
The Let node be the result of converting nodes into a node given
- nodes and this's node document.
+ Let node be the result of converting nodes into a node given this,
+ nodes, and this's node document.
Let node be the result of converting nodes into a node given
- nodes and this's node document.
+ Let node be the result of converting nodes into a node given this,
+ nodes, and this's node document.
Ensure pre-insertion validity of node into this before
null.
@@ -3212,9 +3240,9 @@ steps are to return the first following sibling that is a
Let node be the result of converting nodes into a node, given
- nodes and this's node document.
+ parent, nodes, and this's node document.
If viablePreviousSibling is null, then set it to parent's
first child; otherwise to viablePreviousSibling's
@@ -3283,7 +3311,7 @@ CharacterData includes ChildNode;
sibling not in nodes; otherwise null.
Let node be the result of converting nodes into a node, given
- nodes and this's node document.
+ parent, nodes, and this's node document.
Pre-insert node into parent before
viableNextSibling.
@@ -3300,7 +3328,7 @@ CharacterData includes ChildNode;
sibling not in nodes; otherwise null.
Let node be the result of converting nodes into a node, given
- nodes and this's node document.
+ parent, nodes, and this's node document.
append(nodes)
method steps are:
-
@@ -3156,8 +3184,8 @@ the number of children of this that are elements
are:
-
interface mixin ChildNode {
- [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 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 remove();
};
DocumentType includes ChildNode;
@@ -3262,7 +3290,7 @@ CharacterData includes ChildNode;
sibling not in nodes; otherwise null.