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 https://github.com/WICG/navigation-api/issues/230#issuecomment-1137891972
We will send a separate Intent to Deprecate and Remove for navigateEvent.transitionWhile().
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. https://github.com/mozilla/standards-positions/issues/543 remains open as the positions request for the original API.
WebKit: No signal. https://www.mail-archive.com/webki...@lists.webkit.org/msg30257.html 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 https://github.com/WICG/navigation-api/issues/230, 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()
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().
The navigation-api/ directory makes extensive use of transitionWhile(), and we're updating it to use intercept() instead alongside implementation of intercept().
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).
This intent message was generated by Chrome Platform Status.
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 blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACf%3D2LL04%2B1%2B6Ap5%3D-SoocDJYA2M8BvYai1STObqt26tduHTuw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-Shs0hU2GFZOpuaF0S5bzWNbbXYa3n1VXo0g%2BvDyzfmA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/118b2f7d-ec9e-7c43-f1d2-be3121e89682%40chromium.org.