@@ -120,6 +120,8 @@ spec:ECMA-262; urlPrefix: https://tc39.github.io/ecma262/
120
120
type:dfn; text:current realm record; url: current-realm
121
121
spec: HTML; urlPrefix: https://html.spec.whatwg.org/
122
122
type: dfn; text: prepare the script element; url: prepare-the-script-element
123
+ type: dfn; text: The text insertion mode; url: parsing-main-incdata
124
+ type: dfn; text: reentrant invocation of the parser; url: nestedParsing
123
125
type: dfn; text: get the text steps; url: get-the-text-steps
124
126
type: dfn; text: set the inner text steps; url: set-the-inner-text-steps
125
127
type: dfn; text: src; url: attr-script-src
@@ -1208,6 +1210,28 @@ The {{HTMLScriptElement/src}} setter steps are:
1208
1210
`script`.</ins>
1209
1211
1. <ins> Set [=this=] 's [=src=] content attribute to |value|.</ins>
1210
1212
1213
+ #### Setting slot values from parser #### {#setting-slot-values-from-parser}
1214
+
1215
+ This document modifies the HTML parser to set the [=script text=] value when the script is created.
1216
+
1217
+ Modify the [=The text insertion mode=] algorithm as follows:
1218
+
1219
+ <dl class="switch">
1220
+ <dt id="scriptEndTag"> An end tag whose tag name is "script"</dt>
1221
+ <dd>
1222
+ <p> ...</p>
1223
+
1224
+ <ins><p> Set <var> script</var> 's [=script text=] value to its [=child text content=] .</p></ins>
1225
+
1226
+ <p> If the <span> active speculative HTML parser</span> is null, then <span> prepare the script
1227
+ element</span> <var> script</var> . This might cause some script to execute, which might cause
1228
+ <span data-x="dom-document-write"> new characters to be inserted into the tokenizer</span> , and
1229
+ might cause the tokenizer to output more tokens, resulting in a [=reentrant invocation of the parser=] .</p>
1230
+
1231
+ <p> ...</p>
1232
+ </dd>
1233
+ </dl>
1234
+
1211
1235
#### Slot value verification #### {#slot-value-verification}
1212
1236
1213
1237
The first few steps of the [=prepare the script element=] algorithm are modified as follows:
0 commit comments