@@ -300,85 +300,10 @@ <h3>
300
300
</ h3 >
301
301
< p >
302
302
The {{Document/onvisibilitychange}} attribute is an < a > event handler
303
- IDL attribute</ a > for the `"visibilitychange"` event type (see
304
- [[[#reacting-to-visibilitychange]]]).
303
+ IDL attribute</ a > for the `"visibilitychange"` event type.
305
304
</ p >
306
305
</ section >
307
306
</ section >
308
- < section >
309
- < h2 id ="reacting-to-visibilitychange ">
310
- Reacting to `"visibilitychange"` changes
311
- </ h2 >
312
- < p >
313
- The < a > task source</ a > for these < a > tasks</ a > is the < a > user
314
- interaction task source</ a > .
315
- </ p >
316
- < p >
317
- When the user agent determines that the visibility of the {{Document}}
318
- of the < a > top-level browsing context</ a > has changed, the user agent
319
- MUST run the following steps:
320
- </ p >
321
- < ol class ="algorithm ">
322
- < li > Let |doc:Document| be the {{Document}} of the < a > top-level browsing
323
- context</ a > .
324
- </ li >
325
- < li > If |doc| is now [=Document/visible=]:
326
- < ol >
327
- < li > If traversing to a < a > session history entry</ a > , run the < a > now
328
- visible algorithm</ a > before running the step to fire the
329
- [=Window/pageshow=] event.
330
- </ li >
331
- < li > Otherwise, < a > queue a task</ a > that runs the < a > now visible
332
- algorithm</ a > .
333
- </ li >
334
- </ ol >
335
- </ li >
336
- < li > Else if |doc| is now not [=Document/visible=], or if the user agent
337
- is to [=Window/unload=] |doc|:
338
- < ol >
339
- < li > If the user agent is to [=Window/unload=] the {{Document}}, run
340
- the < a > now hidden algorithm</ a > during the < a > unloading document
341
- visibility change steps</ a > .
342
- </ li >
343
- < li > Otherwise, < a > queue a task</ a > that runs the < a > now hidden
344
- algorithm</ a > .
345
- </ li >
346
- </ ol >
347
- </ li >
348
- </ ol >
349
- < p >
350
- The < dfn data-export ="" data-dfn-type ="abstract-op "> now visible
351
- algorithm</ dfn > runs the following steps synchronously:
352
- </ p >
353
- < ol class ="algorithm ">
354
- < li > Let |doc:Document| be the {{Document}} of the < a > top-level browsing
355
- context</ a > .
356
- </ li >
357
- < li >
358
- < a > Fire an event</ a > named "`visibilitychange`" that bubbles, isn't
359
- cancelable, and has no default action, at the |doc|.
360
- </ li >
361
- < li > Run < dfn data-export ="" data-dfn-type ="abstract-op "> external now
362
- visible algorithm</ dfn > if one is defined by another specification.
363
- </ li >
364
- </ ol >
365
- < p >
366
- The < dfn data-export ="" data-dfn-type ="abstract-op "> now hidden
367
- algorithm</ dfn > runs the following steps synchronously:
368
- </ p >
369
- < ol class ="algorithm ">
370
- < li > Let |doc:Document| be the {{Document}} of the < a > top-level browsing
371
- context</ a > .
372
- </ li >
373
- < li >
374
- < a > Fire an event</ a > named "`visibilitychange`" that bubbles, isn't
375
- cancelable, and has no default action, at the |doc|.
376
- </ li >
377
- < li > Run < dfn data-export =""> external now hidden algorithm</ dfn > if one
378
- is defined by another specification.
379
- </ li >
380
- </ ol >
381
- </ section >
382
307
< section id ="privacy-security ">
383
308
< h2 >
384
309
Privacy and Security
0 commit comments