Navigation API
The committed read-only property of the
NavigationTransition interface returns a Promise that fulfills when Navigation.currentEntry is updated and the new URL is displayed in the browser, marking the navigation as committed. This happens after all precommit handlers for the navigation are fulfilled.
The committed promise rejects if any precommit handler rejects.
Value
A Promise that resolves to undefined.
Examples
async function lockInNavigation() {
await navigation.transition.committed;
// Navigation has committed successfully
}
Specifications
Browser compatibility
See also
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
