← Back to release summary

Removal of navigateEvent.transitionWhile()

Category
Miscellaneous
Type
Feature removal
Status
Removed (Chrome 108)
Intent stage
Prepare to ship

Summary

transitionWhile() is being replaced by navigateEvent.intercept() due to design flaws reported by developers. intercept() behaves nearly identically to transitionWhile(), but instead of taking a mandatory Promise parameter, it takes an optional handler function that returns a Promise. This allows the browser to control when handler executes, which is later and more intuitive than what transitionWhile() required. Also, the "default" intercept() case with no handler is much shorter and simpler to write than the "default" transitionWhile() boilerplate.

Motivation

transitionWhile() has design issues that have meant developers have found it difficult to use effectively, detailed in https://github.com/WICG/navigation-api/issues/230#issuecomment-1137891972 intercept() is being introduced to provide a more usable API for the same basic functionality of transitionWhile()

Standards & signals

View on chromestatus.com