Skip to content

Commit

Permalink
Fire the pageswap event when navigating away from a document
Browse files Browse the repository at this point in the history
See also w3c/csswg-drafts#9819.

The pageswap event is specified here to work as follows:

* It's sent whenever a document navigates away, to a different document, but not when unloaded for other reasons, such as closing the browser types or unloading an ancestor.

* It includes a NavigationActivation object for same-origin navigations.

* If the navigation might trigger a cross-document view-transition (this is determined when snapshotting the source document, by reading the CSS), pageswap is fired and then unloading is deferred until the old state is captured for the view transition. Otherwise, if the view transition is skipped, unloading happens immediately.

Closes #9702.
  • Loading branch information
noamr committed Feb 29, 2024
1 parent ea25247 commit a0a7218
Showing 1 changed file with 271 additions and 17 deletions.
Loading

0 comments on commit a0a7218

Please sign in to comment.