web api interface
NavigationTransition
The NavigationTransition interface of the Navigation API represents an ongoing navigation — a navigation that hasn’t yet reached the navigatesuccess or navigateerror stage.
It is accessed via the transition property.
Note that this property is only populated while the intercept() handler is unresolved (i.e., during a navigation interception), and is otherwise null.
Instance properties
committedRead only- : Returns a
Promisethat fulfills whencurrentEntryis updated and the new URL is displayed in the browser, marking the navigation as committed.
- : Returns a
finishedRead only- : Returns a
Promisethat fulfills at the same time thenavigatesuccessevent fires, or rejects at the same time thenavigateerrorevent fires.
- : Returns a
fromRead only- : Returns the
NavigationHistoryEntrythat the transition is coming from.
- : Returns the
navigationTypeRead only- : Returns the type of the ongoing navigation.
toRead only Experimental- : Returns the
NavigationDestinationthat the transition is navigating to.
- : Returns the
Examples
async function cleanupNavigation() {
await navigation.transition.finished;
// Navigation has completed successfully
// Cleanup any ongoing monitoring
}
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.