web-feature: Navigation precommit handlers
The precommitHandler callback option to NavigateEvent’s intercept() method returns a promise that defers navigation until the promise resolves. You can use this to change the navigation’s URL, state, and history before navigation occurs.