files/en-us/web/api/navigationtransition/index.md
{{APIRef("Navigation API")}}
The NavigationTransition interface of the {{domxref("Navigation API", "Navigation API", "", "nocode")}} represents an ongoing navigation, that is, a navigation that hasn't yet reached the {{domxref("Navigation/navigatesuccess_event", "navigatesuccess")}} or {{domxref("Navigation/navigateerror_event", "navigateerror")}} stage.
It is accessed via the {{domxref("Navigation.transition")}} property.
{{InheritanceDiagram}}
async function cleanupNavigation() {
await navigation.transition.finished;
// Navigation has completed successfully
// Cleanup any ongoing monitoring
}
{{Specifications}}
{{Compat}}