WICG / navigation-api

The new navigation API provides a new interface for navigations and session history, with a focus on single-page application navigations.
https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api
484 stars 30 forks source link

Allow detection of non-intercepted ongoing navigations #266

Open tbondwilkinson opened 1 year ago

tbondwilkinson commented 1 year ago

For certain navigations like cross-document navigations, we have no ability to detect that they are occurring unless they are intercepted. It would be nice to additionally expose them as part of navigation.transition.

The workaround is to set a boolean that the cross-document navigation is occurring, but this requires also unsetting the bit on pageshow because we have no way to observe when the cross-document navigation has finished otherwise. Instead, checking navigation.transition would allow us to only reject traversals occurring a cross-document navigation