diff --git a/dom.bs b/dom.bs
index 7e1b2fad..d9ece77e 100644
--- a/dom.bs
+++ b/dom.bs
@@ -3034,41 +3034,28 @@ standards that want to define APIs shared between documents and
parent, nodes and document, run these steps:
+ Let node be null.
+
Replace each string in nodes with a new {{Text}} node whose
+ data is the string and node document is
+ document.
Let isScriptElement be parent is a {{HTMLScriptElement}}.
-
For each value in nodes:
+
For each value in nodes:
- If value is a node, then:
- If isScriptElement is false, skip to the next value.
-
- If value's {{nodeType}} is not {{TEXT_NODE}}, skip to the next value.
-
- Let text be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments:
- * {{TrustedScript}} as expectedType,
- * document's [=relevant global object=] as global,
- * value's data as input,
- * `HTMLScriptElement text` as sink,
- * `script` as sinkGroup.
-
-
If the algorithm threw an error, rethrow the error.
-
- Set value's data to text.
+
- If value is not a {{Text}} node, then continue.
+
- Let text be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments:
+ * {{TrustedScript}} as expectedType,
+ * document's [=relevant global object=] as global,
+ * value's data as input,
+ * `HTMLScriptElement text` as sink,
+ * `script` as sinkGroup.
+
+
If the algorithm threw an error, rethrow the error.
+
- Set value's data to text.
- - If value is a string, then:
-
- - Let text be value.
-
- If isScriptElement is true:
-
- - Let text be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments:
- * {{TrustedScript}} as expectedType,
- * document's [=relevant global object=] as global,
- * value as input,
- * `HTMLScriptElement text` as sink,
- * `script` as sinkGroup.
-
- If the algorithm threw an error, rethrow the error.
-
- Let newValue be a new {{Text}} node whose
- data is text and node document is document.
-
- Replace value with newValue.
-
-
+
- If value is a {{TrustedScript}}, then:
- Let text be value's Data internal slot value.
@@ -3077,7 +3064,6 @@ standards that want to define APIs shared between documents and
- Replace value with newValue.
- Let node be null.
If nodes contains one node, then set node to
nodes[0].