Intent to Ship: navigateEvent.intercept()

Skip to first unread message

Nate Chapin

Jun 14, 2022, 2:25:35 PM6/14/22
to blink-dev

Contact emails,



intercept() works very similarly to the already existing navigateEvent.transitionWhile(), except that instead of taking a mandatory Promise, it takes an optional handler function. If a function is provided and it returns a promise, navigation finish will be delayed until the Promise resolves, just as transitionWhile() delays navigation finish for its Promise.

This address design problems with transitionWhile(), detailed in

We will send a separate Intent to Deprecate and Remove for navigateEvent.transitionWhile().

Blink component


TAG review

TAG review status

Issues open


Interoperability and Compatibility

Most of the compatibility risk comes from the removal of transitionWhile(), and will be discussed in that separate Intent. For those migrating to intercept(), the main risk is that web developer "handling" logic will run at a subtly different time, but per the explainer that time will actually be less buggy in the usual case.

Gecko: No signal. remains open as the positions request for the original API.

WebKit: No signal. remains open as the positions request for the original API.

Web developers: Positive. The problem this was solving was discovered by a web developer in, and has some engagement there. The bonus of no longer having to pass an empty promise also addresses some feedback we've heard in the past.


Any developer able to use navigateEvent.transitionWhile() should find intercept() a modestly more usable substitute.


None different than transitionWhile()

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None, this should work identically on all platforms.


Debugging should be no different than debugging transitionWhile().

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?


Is this feature fully tested by web-platform-tests?

The navigation-api/ directory makes extensive use of transitionWhile(), and we're updating it to use intercept() instead alongside implementation of intercept().

Requires code in //chrome?


Tracking bug

Estimated milestones


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

Link to entry on the Chrome Platform Status

This intent message was generated by Chrome Platform Status.

Chris Harrelson

Jun 22, 2022, 12:23:36 PM6/22/22
to Nate Chapin, blink-dev

You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Mike Taylor

Jun 22, 2022, 12:57:41 PM6/22/22
to Chris Harrelson, Nate Chapin, blink-dev

Mike West

Jun 29, 2022, 10:48:10 AM6/29/22
to Mike Taylor, Chris Harrelson, Nate Chapin, blink-dev
Reply all
Reply to author
0 new messages