Skip to content

Commit

Permalink
Clarify the unloading document cleanup steps
Browse files Browse the repository at this point in the history
This fixes the references to "objects whose constructor was invoked from
the Document's Window object" to instead be about the object's relevant
global object. It also fixes some grammatical errors and in general
makes the algorithm easier to read.

Closes #2138.
  • Loading branch information
yuyokk authored and domenic committed Dec 28, 2016
1 parent 3f1e12d commit ef139a4
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -83392,25 +83392,36 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {

<ol>

<li><p>Let <var>window</var> be the <code>Document</code>'s <code>Window</code> object.</p></li>

<li>

<p><span>Make disappear</span> any <code>WebSocket</code> objects that were created by the <code
data-x="dom-WebSocket">WebSocket()</code> constructor from the
<code>Document</code>'s <code>Window</code> object.</p>
<p>For each <code>WebSocket</code> object <var>webSocket</var> whose <span
data-x="concept-relevant-global">relevant global object</span> is equal to <var>window</var>,
<span>make disappear</span> <var>webSocket</var>.</p>

<p>If this affected any <code>WebSocket</code> objects, then set <code>Document</code>'s <i
<p>If this affected any <code>WebSocket</code> objects, then set the <code>Document</code>'s <i
data-x="concept-document-salvageable">salvageable</i> state to false.</p>

</li>

<li><p>If the <code>Document</code>'s <i data-x="concept-document-salvageable">salvageable</i>
state is false, <span data-x="concept-EventSource-forcibly-close">forcibly close</span> any
<code>EventSource</code> objects that whose constructor was invoked from the
<code>Document</code>'s <code>Window</code> object.</p></li>
<li>

<p>If the <code>Document</code>'s <i data-x="concept-document-salvageable">salvageable</i>
state is false, run the following substeps:</p>

<ol>

<li><p>For each <code>EventSource</code> object <var>eventSource</var> whose <span
data-x="concept-relevant-global">relevant global object</span> is equal to <var>window</var>,
<span data-x="concept-EventSource-forcibly-close">forcibly close</span>
<var>eventSource</var>.</p></li>

<li><p>Empty <var>window</var>'s <span>list of active timers</span>.</p></li>

<li><p>If the <code>Document</code>'s <i data-x="concept-document-salvageable">salvageable</i>
state is false, empty the <code>Document</code>'s <code>Window</code>'s <span>list of active
timers</span>.</p></li>
</ol>

</li>

</ol>

Expand Down

0 comments on commit ef139a4

Please sign in to comment.