@@ -85167,8 +85167,8 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
85167
85167
<p>Things that can cause the page to be unsalvageable include:</p>
85168
85168
85169
85169
<ul class="brief">
85170
- <li>Listening for <code data-x="event-beforeunload">beforeunload </code> events
85171
- <li>Listening for <code data-x="event- unload">unload</code> events
85170
+ <li>The user agent decided to not keep the <code>Document </code> alive in a <span>session
85171
+ history entry</span> after <span data-x="unload a document ">unload</span>
85172
85172
<li>Having <code>iframe</code>s that are not salvageable
85173
85173
<li>Active <code>WebSocket</code> objects
85174
85174
<li><span data-x="abort a document">Aborting a <code>Document</code></span>
@@ -85220,12 +85220,12 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
85220
85220
85221
85221
<p>A <code>Document</code> has a <dfn
85222
85222
data-x="concept-document-salvageable"><i>salvageable</i></dfn> state, which must initially be
85223
- true, a <dfn>fired unload </dfn> flag, which must initially be false, and a <dfn >page showing</dfn>
85224
- flag, which must initially be false. The <span>page showing</span> flag is used to ensure that
85225
- scripts receive <code data-x="event-pageshow">pageshow</code> and <code
85226
- data-x="event-pagehide">pagehide</code> events in a consistent manner (e.g. that they never
85227
- receive two <code data-x="event-pagehide">pagehide</code> events in a row without an intervening
85228
- <code data-x="event-pageshow">pageshow</code>, or vice versa).</p>
85223
+ true, and a <dfn>page showing </dfn> flag, which must initially be false. The <span >page
85224
+ showing</span> flag is used to ensure that scripts receive <code
85225
+ data-x="event-pageshow">pageshow</code> and <code data-x="event-pagehide">pagehide</code> events
85226
+ in a consistent manner (e.g. that they never receive two <code
85227
+ data-x="event-pagehide">pagehide</code> events in a row without an intervening <code
85228
+ data-x="event-pageshow">pageshow</code>, or vice versa).</p>
85229
85229
85230
85230
<p><span data-x="event loop">Event loops</span> have a <dfn>termination nesting level</dfn>
85231
85231
counter, which must initially be 0.</p>
@@ -85253,10 +85253,6 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
85253
85253
<li><p>Decrease the <span>event loop</span>'s <span>termination nesting level</span> by
85254
85254
1.</p></li>
85255
85255
85256
- <li><p>If any event listeners were triggered by the earlier <i>dispatch</i> step, then set
85257
- <var>document</var>'s <i data-x="concept-document-salvageable">salvageable</i> state to
85258
- false.</p></li>
85259
-
85260
85256
<li>
85261
85257
<p>If <var>document</var>'s <span>active sandboxing flag set</span> does not have its
85262
85258
<span>sandboxed modals flag</span> set, and the <code
@@ -85292,15 +85288,11 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
85292
85288
85293
85289
<ol>
85294
85290
<li><p><span>Prompt to unload</span> <var>browsingContext</var>'s <span>active
85295
- document</span> with the <var>recursiveFlag</var> set. If the user <span>refused to allow
85296
- the document to be unloaded</span>, then the user implicitly also <span data-x="refused to
85297
- allow the document to be unloaded">refused to allow <var>document</var> to be
85298
- unloaded</span>; <span>break</span>.</p></li>
85299
-
85300
- <li><p>If the <i data-x="concept-document-salvageable">salvageable</i> state of
85301
- <var>browsingContext</var>'s <span>active document</span> is false, then set the <i
85302
- data-x="concept-document-salvageable">salvageable</i> state of <var>document</var> to
85303
- false.</p></li>
85291
+ document</span> with the <var>recursiveFlag</var> set.</p></li>
85292
+
85293
+ <li><p>If the user <span>refused to allow the document to be unloaded</span>, then the user
85294
+ implicitly also <span data-x="refused to allow the document to be unloaded">refused to allow
85295
+ <var>document</var> to be unloaded</span>; <span>break</span>.</p></li>
85304
85296
</ol>
85305
85297
</li>
85306
85298
</ol>
@@ -85327,6 +85319,11 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
85327
85319
85328
85320
<li><p>Set <var>document</var>'s <span>page showing</span> flag to false.</p></li>
85329
85321
85322
+ <li><p>If the user agent does not intend to keep <var>document</var> alive
85323
+ in a <span>session history entry</span> (such that it can be reused later on <span
85324
+ data-x="traverse the history">history traversal</span>), set <var>document</var>'s
85325
+ <i data-x="concept-document-salvageable">salvageable</i> state to false.</p></li>
85326
+
85330
85327
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
85331
85328
data-x="event-pagehide">pagehide</code> at <var>document</var>'s <span>relevant global
85332
85329
object</span>, using <code>PageTransitionEvent</code>, with the <code
@@ -85342,18 +85339,15 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
85342
85339
<ref spec=PAGEVIS></p>
85343
85340
</li>
85344
85341
85345
- <li><p><i>Unload event</i>: If <var>document</var>'s <span>fired unload</span> flag is
85346
- false, then <span data-x="concept-event-fire">fire an event</span> named <code
85347
- data-x="event-unload">unload</code> at <var>document</var>'s <span>relevant global object</span>,
85348
- with <var>legacy target override flag</var> set.</p></li>
85342
+ <li><p><i>Unload event</i>: If <var>document</var>'s <i
85343
+ data-x="concept-document-salvageable">salvageable</i> state is false, then <span
85344
+ data-x="concept-event-fire">fire an event</span> named <code data-x="event-unload">unload</code>
85345
+ at <var>document</var>'s <span>relevant global object</span>, with <var>legacy target override
85346
+ flag</var> set.</p></li>
85349
85347
85350
85348
<li><p>Decrease the <span>event loop</span>'s <span>termination nesting level</span> by
85351
85349
one.</p></li>
85352
85350
85353
- <li><p>If any event listeners were triggered by the earlier <i>unload event</i> step, then set
85354
- <var>document</var>'s <i data-x="concept-document-salvageable">salvageable</i> state
85355
- to false and set <var>document</var>'s <span>fired unload</span> flag to true.</p></li>
85356
-
85357
85351
<li><p>Run any <span>unloading document cleanup steps</span> for <var>document</var> that are
85358
85352
defined by this specification and <span>other applicable specifications</span>.</p></li>
85359
85353
0 commit comments