You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/index.bs
+16-6Lines changed: 16 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1068,8 +1068,8 @@ Given a {{TrustedType}} type (|expectedType|), a [=realm/global object=] (|globa
1068
1068
1069
1069
Given an {{HTMLScriptElement}} (|script|), this algorithm performs the following steps:
1070
1070
1071
-
1. If |script|'s [=script text=] value is not equal to its [=child text content=],
1072
-
set |script|'s [=script text=] to the result of executing [$Get Trusted Type compliant string$], with the following arguments:
1071
+
1. If |script|'s [=HTMLScriptElement/script text=] value is not equal to its [=child text content=],
1072
+
set |script|'s [=HTMLScriptElement/script text=] to the result of executing [$Get Trusted Type compliant string$], with the following arguments:
1073
1073
* {{TrustedScriptURL}} as |expectedType|,
1074
1074
* |script|'s {{Document}}'s [=relevant global object=] as |global|,
1075
1075
* |script|'s [=child text content=] attribute value,
@@ -1175,14 +1175,24 @@ This document modifies {{HTMLScriptElement}}s. Each script has:
1175
1175
through a compliant sink. Equivalent to script's
1176
1176
[=child text content=]. Initially an empty string.
1177
1177
1178
+
This document also modifies {{SVGScriptElement}}s. Each script has:
1179
+
1180
+
: an associated string <dfn export for="SVGScriptElement">script text</dfn>.
1181
+
:: A string, containing the body of the script to execute that was set
1182
+
through a compliant sink. Equivalent to script's
1183
+
[=child text content=]. Initially an empty string.
1184
+
1185
+
Issue: There's currently no defined processing model for {{SVGScriptElement}}s. This spec assumes one that is similar to that of {{HTMLScriptElement}}'s model.
1186
+
Use [=SVGScriptElement/script text=] in the same way you would use [=HTMLScriptElement/script text=].
1187
+
1178
1188
#### The {{HTMLScriptElement/innerText}} IDL attribute #### {#the-innerText-idl-attribute}
1179
1189
1180
1190
The {{HTMLScriptElement/innerText}} setter steps are:
1181
1191
1182
1192
1. Let |value| be the result of calling [$Get Trusted Type compliant string$] with
1183
1193
{{TrustedScript}}, [=this=]'s [=relevant global object=], the given value, `HTMLScriptElement innerText`, and
1184
1194
`script`.
1185
-
1. Set [=this=]'s [=script text=] value to |value|.
1195
+
1. Set [=this=]'s [=HTMLScriptElement/script text=] value to |value|.
1186
1196
1. Run [=set the inner text steps=] with [=this=] and |value|.
1187
1197
1188
1198
The {{HTMLScriptElement/innerText}} getter steps are:
@@ -1197,7 +1207,7 @@ empty string instead, and then do as described below:
1197
1207
1. Let |value| be the result of calling [$Get Trusted Type compliant string$] with
1198
1208
{{TrustedScript}}, [=this=]'s [=relevant global object=], the given value, `HTMLScriptElement textContent`, and
1199
1209
`script`.
1200
-
1. Set [=this=]'s [=script text=] value to |value|.
1210
+
1. Set [=this=]'s [=HTMLScriptElement/script text=] value to |value|.
1201
1211
1. Run [=set text content=] with [=this=] and |value|.
1202
1212
1203
1213
The {{HTMLScriptElement/textContent}} getter steps are:
@@ -1211,7 +1221,7 @@ Update the {{HTMLScriptElement/text}} setter steps algorithm as follows.
1211
1221
1. <ins>Let |value| be the result of calling [$Get Trusted Type compliant string$] with
1212
1222
{{TrustedScript}}, [=this=]'s [=relevant global object=], the given value, `HTMLScriptElement text`, and
1213
1223
`script`.</ins>
1214
-
1. <ins>Set [=this=]'s [=script text=] value to the given value.</ins>
1224
+
1. <ins>Set [=this=]'s [=HTMLScriptElement/script text=] value to the given value.</ins>
1215
1225
1. [=String replace all=] with the given value within [=this=].
1216
1226
1217
1227
@@ -1244,7 +1254,7 @@ The first few steps of the [=prepare the script element=] algorithm are modified
1244
1254
run when the parser tries to run it, but it is later executed after a script dynamically
1245
1255
updates it, it will execute in an async fashion even if the <code id=script-processing-model:attr-script-async-5><a href=https://html.spec.whatwg.org/#attr-script-async>async</a></code> attribute isn't set.</p>
1246
1256
<li><ins><p>Execute the [$Prepare the script text$] algorithm on <var>el</var>. If that algorithm threw an error, then return.</p></ins></li>
1247
-
<li><p>Let <var ignore="">source text</var> be <var>el</var>'s <del><a id=script-processing-model:child-text-content href=https://dom.spec.whatwg.org/#concept-child-text-content data-x-internal=child-text-content>child text content</a>.</del><ins>[=script text=] value.</ins>
1257
+
<li><p>Let <var ignore="">source text</var> be <var>el</var>'s <del><a id=script-processing-model:child-text-content href=https://dom.spec.whatwg.org/#concept-child-text-content data-x-internal=child-text-content>child text content</a>.</del><ins>[=HTMLScriptElement/script text=] value.</ins>
0 commit comments