@@ -9037,12 +9037,14 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
9037
9037
<dd>
9038
9038
9039
9039
<p>Returns the <code>script</code> element, or the <span>SVG <code>script</code></span> element,
9040
- that is currently executing. In the case of reentrant script execution, returns the one that
9041
- most recently started executing amongst those that have not yet finished executing.</p>
9040
+ that is currently executing, as long as the element represents a <span>classic script</span>.
9041
+ In the case of reentrant script execution, returns the one that most recently started executing
9042
+ amongst those that have not yet finished executing.</p>
9042
9043
9043
9044
<p>Returns null if the <code>Document</code> is not currently executing a <code>script</code>
9044
9045
or <span>SVG <code>script</code></span> element (e.g., because the running script is an event
9045
- handler, or a timeout).</p>
9046
+ handler, or a timeout), or if the currently executing <code>script</code> or <span>SVG
9047
+ <code>script</code></span> element represents a <span>module script</span>.</p>
9046
9048
9047
9049
</dd>
9048
9050
@@ -9051,9 +9053,9 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
9051
9053
<div w-nodev>
9052
9054
9053
9055
<p>The <dfn><code data-x="dom-document-currentScript">currentScript</code></dfn> attribute, on
9054
- getting, must return the value to which it was most recently initialised . When the
9055
- <code>Document</code> is created, the <code
9056
- data-x="dom-document-currentScript">currentScript</code> must be initialised to null.</p>
9056
+ getting, must return the value to which it was most recently set . When the <code>Document</code>
9057
+ is created, the <code data-x="dom-document-currentScript">currentScript</code> must be
9058
+ initialised to null.</p>
9057
9059
9058
9060
</div>
9059
9061
@@ -58882,7 +58884,8 @@ o............A....e
58882
58884
58883
58885
<li>
58884
58886
58885
- <p><span>Fire a simple event</span> named <code
58887
+ <p>If <span data-x="concept-script-type">the script's type</span> is "<code
58888
+ data-x="">classic</code>", <span>fire a simple event</span> named <code
58886
58889
data-x="event-beforescriptexecute">beforescriptexecute</code> that bubbles and is cancelable
58887
58890
at the <code>script</code> element.</p>
58888
58891
@@ -58900,39 +58903,30 @@ o............A....e
58900
58903
58901
58904
</li>
58902
58905
58903
- <li>
58904
-
58905
- <p>Let <var>old script element</var> be the value to which the <code>script</code>
58906
- element's <span>node document</span>'s <code
58907
- data-x="dom-document-currentScript">currentScript</code> object was most recently
58908
- initialised.</p>
58909
-
58910
- </li>
58911
-
58912
- <li>
58913
-
58914
- <p>Initialise the <code>script</code> element's <span>node document</span>'s <code
58915
- data-x="dom-document-currentScript">currentScript</code> object to the <code>script</code>
58916
- element.</p>
58917
-
58918
- </li>
58919
-
58920
- <li>
58921
-
58922
- <p>Let <var>settings object</var> be the <span>environment settings object</span> of the
58923
- <code>script</code> element's <span>node document</span>'s <code>Window</code> object.</p>
58924
-
58925
- </li>
58926
-
58927
58906
<li>
58928
58907
58929
58908
<p>Switch on <span data-x="concept-script-type">the script's type</span>:</p>
58930
58909
58931
58910
<dl class="switch">
58932
58911
<dt>"<code data-x="">classic</code>"</dt>
58933
58912
<dd>
58934
- <p><span data-x="run a classic script">Run the classic script</span> given by <span
58935
- data-x="concept-script-script">the script's script</span>.</p>
58913
+ <ol>
58914
+ <li><p>Let <var>old script element</var> be the value to which the <code>script</code>
58915
+ element's <span>node document</span>'s <code
58916
+ data-x="dom-document-currentScript">currentScript</code> object was most recently
58917
+ set.</p></li>
58918
+
58919
+ <li><p>Set the <code>script</code> element's <span>node document</span>'s <code
58920
+ data-x="dom-document-currentScript">currentScript</code> attribute to the
58921
+ <code>script</code> element.</p></li>
58922
+
58923
+ <li><p><span data-x="run a classic script">Run the classic script</span> given by <span
58924
+ data-x="concept-script-script">the script's script</span>.</p></li>
58925
+
58926
+ <li><p>Set the <code>script</code> element's <span>node document</span>'s <code
58927
+ data-x="dom-document-currentScript">currentScript</code> attribute to <var>old script
58928
+ element</var>.</p></li>
58929
+ </ol>
58936
58930
</dd>
58937
58931
58938
58932
<dt>"<code data-x="">module</code>"</dt>
@@ -58944,14 +58938,6 @@ o............A....e
58944
58938
58945
58939
</li>
58946
58940
58947
- <li>
58948
-
58949
- <p>Initialise the <code>script</code> element's <span>node document</span>'s <code
58950
- data-x="dom-document-currentScript">currentScript</code> object to <var>old script
58951
- element</var>.</p>
58952
-
58953
- </li>
58954
-
58955
58941
<li>
58956
58942
58957
58943
<p>Decrement the <span>ignore-destructive-writes counter</span> of <var>neutralised doc</var>, if it was incremented in the earlier step.</p>
@@ -58960,7 +58946,8 @@ o............A....e
58960
58946
58961
58947
<li>
58962
58948
58963
- <p><span>Fire a simple event</span> named <code
58949
+ <p>If <span data-x="concept-script-type">the script's type</span> is "<code
58950
+ data-x="">classic</code>", <span>fire a simple event</span> named <code
58964
58951
data-x="event-afterscriptexecute">afterscriptexecute</code> that bubbles (but is not
58965
58952
cancelable) at the <code>script</code> element.</p>
58966
58953
0 commit comments