@@ -78530,11 +78530,8 @@ interface <dfn data-export="" data-dfn-type="interface">Window</dfn> : <span>Eve
78530
78530
been <span data-x="a browsing context is discarded">discarded</span>, and false otherwise.</p>
78531
78531
78532
78532
<p>The <dfn><code data-x="dom-window-stop">stop()</code></dfn> method on <code>Window</code>
78533
- objects should, if there is an existing attempt to <span>navigate</span> the <span>browsing
78534
- context</span> and that attempt is not currently running the <span>unload a document</span>
78535
- algorithm, cancel that <span data-x="navigate">navigation</span>; then, it must <span
78536
- data-x="abort a document">abort</span> the <span>active document</span> of the <span>browsing
78537
- context</span> of the <code>Window</code> object on which it was invoked.</p>
78533
+ objects must <span>stop document loading</span> given this <code>Window</code> object's <span
78534
+ data-x="concept-document-window">associated <code>Document</code></span>.</p>
78538
78535
78539
78536
</div>
78540
78537
@@ -83776,6 +83773,22 @@ interface <dfn>BeforeUnloadEvent</dfn> : <span>Event</span> {
83776
83773
83777
83774
<!-- I'd love to make this more precise, anyone have any suggestions on what it should say? -->
83778
83775
83776
+ <p>To <dfn>stop document loading</dfn> given a <code>Document</code> object <var>document</var>,
83777
+ run these steps:</p>
83778
+
83779
+ <ol>
83780
+ <li><p>If <var>document</var> is not an <span>active document</span>, then return.</p></li>
83781
+
83782
+ <li><p>Let <var>browsingContext</var> be <var>document</var>'s <span
83783
+ data-x="concept-document-bc">browsing context</span>.</p></li>
83784
+
83785
+ <li><p>If there is an existing attempt to <span>navigate</span> <var>browsingContext</var> and
83786
+ that attempt is not currently running the <span>unload a document</span> algorithm, then cancel
83787
+ that <span data-x="navigate">navigation</span>.</p></li>
83788
+
83789
+ <li><p><span data-x="abort a document">Abort</span> <var>document</var>.</p></li>
83790
+ </ol>
83791
+
83779
83792
</div>
83780
83793
83781
83794
@@ -90987,8 +91000,18 @@ document.body.appendChild(frame)</code></pre>
90987
91000
handler while the <code>Document</code> is being unloaded.</p>
90988
91001
</li>
90989
91002
90990
- <li><p>If <var>document</var> is an <span>active document</span>, then <span data-x="abort a
90991
- document">abort</span> <var>document</var>.</p></li>
91003
+ <li>
91004
+ <p>If there is an existing attempt to <span>navigate</span> <var>document</var>'s <span
91005
+ data-x="concept-document-bc">browsing context</span>, then <span>stop document loading</span>
91006
+ given <var>document</var>.</p>
91007
+
91008
+ <p class="XXX">Issue <a
91009
+ href="https://github.com/whatwg/html/issues/3447">#3447</a> looks into the distinction between
91010
+ an ongoing instance of the <span>navigate</span> algorithm versus tasks to <span>navigate</span>
91011
+ that are still queued. For the purpose of implementing this step, both an ongoing instance of
91012
+ the <span>navigate</span> algorithm and tasks queued to <span>navigate</span> should be counted
91013
+ towards "an existing attempt to <span>navigate</span>," before that issue is resolved.</p>
91014
+ </li>
90992
91015
90993
91016
<li><p>For each <span>shadow-including inclusive descendant</span> <var>node</var> of
90994
91017
<var>document</var>, <span>erase all event listeners and handlers</span> given
0 commit comments