NavigationTransition: to property

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The to read-only property of the NavigationTransition interface returns the NavigationDestination that the transition is navigating to.

This mirrors the NavigateEvent.destination property but, unlike that, is available outside of the navigate event handler. It is especially useful when calling functions prior to the URL changing (e.g., during precommit or on error).

Value

A NavigationDestination object.

Examples

Handling a navigation error

js
navigation.onnavigateerror = (e) => {
  if (navigation.transition?.to?.url === loginPageURL) {
    /* do something when failing to go to login page */
  }
};

Specifications

Specification
HTML
# dom-navigationtransition-to

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
to
Experimental
Chrome – Full support
Chrome 145 (Release date: 2026-02-10)
footnote Full support
Edge – Full support
Edge 145 (Release date: 2026-02-14)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 129 (Release date: 2026-03-18)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 145 (Release date: 2026-02-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 96 (Release date: 2026-03-10)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 145 (Release date: 2026-02-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

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

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also