← Back to release summary
Removal of navigateEvent.restoreScroll()
- Category
- Miscellaneous
- Type
- Feature removal
- Status
- Removed (Chrome 108)
- Intent stage
- Prepare to ship
Summary
restoreScroll() is being replaced by navigateEvent.scroll(). scroll() works identically except that it allows the developer to control scroll timing for non-traverse navigations (i.e., scroll() works when the scroll is not a restore, hence the name change along with the behavior change).
Motivation
We want to support developer-controlled timing of a navigation-associated scroll in non-traverse cases (e.g., scrolling to a fragment). It makes sense to have the same fragment drive navigation-related scrolling in both traverse and non-traverse cases, but the name "restoreScroll" is nonsense for push/replace navigations.
Standards & signals
- Specification: https://github.com/WICG/navigation-api/pull/235
- Firefox: No signal — https://github.com/mozilla/standards-positions/issues/543 remains open as the positions request for the original API.
- Safari: No signal — https://www.mail-archive.com/webkit-dev@lists.webkit.org/msg30257.html remains open as the positions request for the original API.
- Web developers: Positive — https://github.com/WICG/navigation-api/issues/237 came out of discussions with web developers.
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1336000
View on chromestatus.com