@@ -3034,41 +3034,31 @@ standards that want to define APIs shared between <a for=/>documents</a> and
3034
3034
<var> parent</var> , <var> nodes</var> and <var> document</var> , run these steps:
3035
3035
3036
3036
<ol>
3037
+ <li><p> Let <var> node</var> be null.
3038
+
3039
+ <li><p> Replace each string in <var> nodes</var> with a new {{Text}} <a for=/>node</a> whose
3040
+ <a for=CharacterData>data</a> is the string and <a for=Node>node document</a> is
3041
+ <var> document</var> .
3042
+
3037
3043
<li><p> Let <var> isScriptElement</var> be <var> parent</var> is a {{HTMLScriptElement}} .
3038
- <li><p> For each <var> value</var> in <var> nodes</var> :
3044
+
3045
+ <li><p> <a for=set>For each</a> <var> value</var> in <var> nodes</var> :
3039
3046
<ol>
3040
3047
<li> If <var> value</var> is a <a for=/>node</a> , then:
3041
3048
<ol>
3042
3049
<li> If <var> isScriptElement</var> is false, skip to the next <var> value</var> .
3043
- <li> If <var> value</var> 's {{nodeType}} is not {{TEXT_NODE}} , skip to the next <var> value </var > .
3044
- <li> Let <var> text</var> be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments:
3045
- * {{TrustedScript}} as <var > expectedType</var > ,
3046
- * <var> document</var> 's [=relevant global object=] as <var > global</var > ,
3047
- * <var> value</var> 's <a for=CharacterData>data</a> as <var > input</var > ,
3048
- * `HTMLScriptElement text` as <var > sink</var > ,
3049
- * `script` as <var > sinkGroup</var > .
3050
-
3051
- <p> If the algorithm threw an error, rethrow the error.
3052
- <li> Set <var> value</var> 's <a for=CharacterData>data</a> to <var> text</var> .
3050
+ <li> If <var> value</var> is not a {{Text}} <a for=/>node</a> , then <a for=iteration>continue</a > .
3051
+ <li> Let <var> text</var> be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments:
3052
+ * {{TrustedScript}} as <span > expectedType</span > ,
3053
+ * <var> document</var> 's [=relevant global object=] as <span > global</span > ,
3054
+ * <var> value</var> 's <a for=CharacterData>data</a> as <span > input</span > ,
3055
+ * `HTMLScriptElement text` as <span > sink</span > ,
3056
+ * `script` as <span > sinkGroup</span > .
3057
+
3058
+ <p> If the algorithm threw an error, rethrow the error.
3059
+ <li> Set <var> value</var> 's <a for=CharacterData>data</a> to <var> text</var> .
3053
3060
</ol>
3054
- <li> If <var> value</var> is a string, then:
3055
- <ol>
3056
- <li> Let <var> text</var> be <var> value</var> .
3057
- <li> If <var> isScriptElement</var> is true:
3058
- <ol>
3059
- <li> Let <var> text</var> be the result of executing the [$Get Trusted Type compliant string$] algorithm, with the following arguments:
3060
- * {{TrustedScript}} as <var> expectedType</var> ,
3061
- * <var> document</var> 's [=relevant global object=] as <var> global</var> ,
3062
- * <var> value</var> as <var> input</var> ,
3063
- * `HTMLScriptElement text` as <var> sink</var> ,
3064
- * `script` as <var> sinkGroup</var> .
3065
-
3066
- If the algorithm threw an error, rethrow the error.
3067
- <li> Let <var> newValue</var> be a new {{Text}} <a for=/>node</a> whose
3068
- <a for=CharacterData>data</a> is <var> text</var> and <a for=Node>node document</a> is <var> document</var> .
3069
- <li> Replace <var> value</var> with <var> newValue</var> .
3070
- </ol>
3071
- </ol>
3061
+
3072
3062
<li> If <var> value</var> is a {{TrustedScript}} , then:
3073
3063
<ol>
3074
3064
<li> Let <var> text</var> be <var> value</var> 's Data internal slot value.
@@ -3077,7 +3067,6 @@ standards that want to define APIs shared between <a for=/>documents</a> and
3077
3067
<li> Replace <var> value</var> with <var> newValue</var> .
3078
3068
</ol>
3079
3069
</ol>
3080
- <li><p> Let <var> node</var> be null.
3081
3070
3082
3071
<li><p> If <var> nodes</var> contains one <a for=/>node</a> , then set <var> node</var> to
3083
3072
<var> nodes</var> [0] .
0 commit comments