Skip to content

Navigation API deferred commit#11580

Merged
domenic merged 1 commit into
mainfrom
nav-commit-2
Aug 21, 2025
Merged

Navigation API deferred commit#11580
domenic merged 1 commit into
mainfrom
nav-commit-2

Conversation

@noamr

@noamr noamr commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

This adds navigateEvent.prototype.intercept({precommitHandler}).

Instead of always "committing" the navigation immediately, the navigation only commits after all its precommitHandler promises are resolved.

In addition, a precommitHandler receives a NavigationPrecommitController as an argument, and can use it to change
the URL of the ongoing navigation before it is commited, using the redirect(newURL) function.

See https://github.com/WICG/navigation-api/blob/main/README.md#precommit-handlers

(See WHATWG Working Mode: Changes for more details.)


/browsing-the-web.html ( diff )
/index.html ( diff )
/nav-history-apis.html ( diff )

@noamr noamr mentioned this pull request Aug 20, 2025
6 tasks
@domenic domenic added addition/proposal New features or enhancements topic: navigation labels Aug 21, 2025
@domenic domenic merged commit e09d102 into main Aug 21, 2025
2 checks passed
@domenic domenic deleted the nav-commit-2 branch August 21, 2025 04:31
domfarolino pushed a commit that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition/proposal New features or enhancements topic: navigation

Development

Successfully merging this pull request may close these issues.

2 participants