NavigateEvent: scroll() method

Baseline 2026
Newly available

Since January 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

The scroll() method of the NavigateEvent interface can be called to manually trigger the browser-driven scrolling behavior that occurs in response to the navigation, if you want it to happen before the navigation handling has completed.

Syntax

js
scroll()

Parameters

None.

Return value

None (undefined).

Exceptions

InvalidStateError DOMException

Thrown if the current Document is not yet active, or if the navigation has been cancelled.

SecurityError DOMException

Thrown if the event was dispatched by a dispatchEvent() call, rather than the user agent.

Examples

Handling scrolling using scroll()

In this example of intercepting a navigation, the handler() function starts by fetching and rendering some article content, but then fetches and renders some secondary content afterwards. It makes sense to scroll the page to the main article content as soon as it is available so the user can interact with it, rather than waiting until the secondary content is also rendered. To achieve this, we have added a scroll() call between the two.

js
navigation.addEventListener("navigate", (event) => {
  if (shouldNotIntercept(navigateEvent)) {
    return;
  }
  const url = new URL(event.destination.url);

  if (url.pathname.startsWith("/articles/")) {
    event.intercept({
      async handler() {
        const articleContent = await getArticleContent(url.pathname);
        renderArticlePage(articleContent);

        event.scroll();

        const secondaryContent = await getSecondaryContent(url.pathname);
        addSecondaryContent(secondaryContent);
      },
    });
  }
});

Specifications

Specification
HTML
# dom-navigateevent-scroll-dev

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
scroll
Chrome – No support
Chrome 102 – 107 (Release date: 2022-05-24)
altname
footnote Removed in 108 and later
altname Alternate name: restoreScroll
Chrome – Full support
Chrome 105 (Release date: 2022-09-02)
footnote Full support
Edge – No support
Edge 102 – 107 (Release date: 2022-05-31)
altname
footnote Removed in 108 and later
altname Alternate name: restoreScroll
Edge – Full support
Edge 105 (Release date: 2022-09-01)
footnote Full support
Firefox – Full support
Firefox 147 (Release date: 2026-01-13)
footnote Full support
Opera – No support
Opera 88 – 93 (Release date: 2022-06-08)
altname
footnote Removed in 94 and later
altname Alternate name: restoreScroll
Opera – Full support
Opera 91 (Release date: 2022-09-14)
footnote Full support
Safari – Full support
Safari 26.2 (Release date: 2025-12-12)
footnote Full support
Chrome Android – No support
Chrome Android 102 – 107 (Release date: 2022-05-24)
altname
footnote Removed in 108 and later
altname Alternate name: restoreScroll
Chrome Android – Full support
Chrome Android 105 (Release date: 2022-09-02)
footnote Full support
Firefox for Android – Full support
Firefox for Android 147 (Release date: 2026-01-13)
footnote Full support
Opera Android – No support
Opera Android 70 – 72 (Release date: 2022-06-29)
altname
footnote Removed in 73 and later
altname Alternate name: restoreScroll
Opera Android – Full support
Opera Android 72 (Release date: 2022-10-21)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26.2 (Release date: 2025-12-12)
footnote Full support
Samsung Internet – No support
Samsung Internet 19 – 20 (Release date: 2022-11-01)
altname
footnote Removed in 21 and later
altname Alternate name: restoreScroll
Samsung Internet – Full support
Samsung Internet 20 (Release date: 2023-02-10)
footnote Full support
WebView Android – No support
WebView Android 102 – 107 (Release date: 2022-05-24)
altname
footnote Removed in 108 and later
altname Alternate name: restoreScroll
WebView Android – Full support
WebView Android 105 (Release date: 2022-09-02)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26.2 (Release date: 2025-12-12)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Uses a non-standard name
Has more compatibility info.

See also