Skip to content

Commit

Permalink
Don't update document.currentScript for module scripts
Browse files Browse the repository at this point in the history
Closes #997.
  • Loading branch information
domenic committed Apr 5, 2016
1 parent a996f3b commit ff9cf1d
Showing 1 changed file with 25 additions and 33 deletions.
58 changes: 25 additions & 33 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -9031,12 +9031,14 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
<dd>

<p>Returns the <code>script</code> element, or the <span>SVG <code>script</code></span> element,
that is currently executing. In the case of reentrant script execution, returns the one that
most recently started executing amongst those that have not yet finished executing.</p>
that is currently executing, as long as the element represents a <span>classic script</span>.
In the case of reentrant script execution, returns the one that most recently started executing
amongst those that have not yet finished executing.</p>

<p>Returns null if the <code>Document</code> is not currently executing a <code>script</code>
or <span>SVG <code>script</code></span> element (e.g., because the running script is an event
handler, or a timeout).</p>
handler, or a timeout), or if the currently executing <code>script</code> or <span>SVG
<code>script</code></span> element represents a <span>module script</span>.</p>

</dd>

Expand All @@ -9045,9 +9047,9 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
<div w-nodev>

<p>The <dfn><code data-x="dom-document-currentScript">currentScript</code></dfn> attribute, on
getting, must return the value to which it was most recently initialised. When the
<code>Document</code> is created, the <code
data-x="dom-document-currentScript">currentScript</code> must be initialised to null.</p>
getting, must return the value to which it was most recently set. When the <code>Document</code>
is created, the <code data-x="dom-document-currentScript">currentScript</code> must be
initialised to null.</p>

</div>

Expand Down Expand Up @@ -58860,23 +58862,6 @@ o............A....e

</li>

<li>

<p>Let <var>old script element</var> be the value to which the <code>script</code>
element's <span>node document</span>'s <code
data-x="dom-document-currentScript">currentScript</code> object was most recently
initialised.</p>

</li>

<li>

<p>Initialise the <code>script</code> element's <span>node document</span>'s <code
data-x="dom-document-currentScript">currentScript</code> object to the <code>script</code>
element.</p>

</li>

<li>

<p>Let <var>settings object</var> be the <span>environment settings object</span> of the
Expand All @@ -58891,8 +58876,23 @@ o............A....e
<dl class="switch">
<dt>"<code data-x="">classic</code>"</dt>
<dd>
<p><span data-x="run a classic script">Run the classic script</span> given by <span
data-x="concept-script-script">the script's script</span>.</p>
<ol>
<li><p>Let <var>old script element</var> be the value to which the <code>script</code>
element's <span>node document</span>'s <code
data-x="dom-document-currentScript">currentScript</code> object was most recently
set.</p></li>

<li><p>Set the <code>script</code> element's <span>node document</span>'s <code
data-x="dom-document-currentScript">currentScript</code> attribute to the
<code>script</code> element.</p></li>

<li><p><span data-x="run a classic script">Run the classic script</span> given by <span
data-x="concept-script-script">the script's script</span>.</p></li>

<li><p>Set the <code>script</code> element's <span>node document</span>'s <code
data-x="dom-document-currentScript">currentScript</code> attribute to <var>old script
element</var>.</p></li>
</ol>
</dd>

<dt>"<code data-x="">module</code>"</dt>
Expand All @@ -58904,14 +58904,6 @@ o............A....e

</li>

<li>

<p>Initialise the <code>script</code> element's <span>node document</span>'s <code
data-x="dom-document-currentScript">currentScript</code> object to <var>old script
element</var>.</p>

</li>

<li>

<p>Decrement the <span>ignore-destructive-writes counter</span> of <var>neutralised doc</var>, if it was incremented in the earlier step.</p>
Expand Down

0 comments on commit ff9cf1d

Please sign in to comment.