Navigation extension type

The Navigation interface of the Navigation API allows control over all navigation actions for the current window in one central place, including initiating navigations programmatically, examining navigation history entries, and managing navigations as they happen.

It is accessed via the Window.navigation property.

The Navigation API only exposes history entries created in the current browsing context that have the same origin as the current page (e.g. not navigations inside embedded iframes, or cross-origin navigations), providing an accurate list of all previous history entries just for your app. This makes traversing the history a much less fragile proposition than with the older History API.

on
Implemented types

Properties

activation NavigationActivation?
no setter
canGoBack bool
no setter
canGoForward bool
no setter
currentEntry NavigationHistoryEntry?
no setter
hashCode int
The hash code for this object.
no setterinherited
oncurrententrychange EventHandler?
getter/setter pair
onnavigate EventHandler?
getter/setter pair
onnavigateerror EventHandler?
getter/setter pair
onnavigatesuccess EventHandler?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transition NavigationTransition?
no setter

Methods

addEventListener(String type, EventListener? callback, [JSAny options]) → void
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
inherited
back([NavigationOptions options]) NavigationResult
The back() method of the Navigation interface navigates backwards by one entry in the navigation history.
dispatchEvent(Event event) bool
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
inherited
entries() JSArray<NavigationHistoryEntry>
The entries() method of the Navigation interface returns an array of NavigationHistoryEntry objects representing all existing history entries.
forward([NavigationOptions options]) NavigationResult
The forward() method of the Navigation interface navigates forwards by one entry in the navigation history.
The navigate() method of the Navigation interface navigates to a specific URL, updating any provided state in the history entries list.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload([NavigationReloadOptions options]) NavigationResult
The reload() method of the Navigation interface reloads the current URL, updating any provided state in the history entries list.
removeEventListener(String type, EventListener? callback, [JSAny options]) → void
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
inherited
toString() String
A string representation of this object.
inherited
traverseTo(String key, [NavigationOptions options]) NavigationResult
The traverseTo() method of the Navigation interface navigates to the NavigationHistoryEntry identified by the given NavigationHistoryEntry.key.
updateCurrentEntry(NavigationUpdateCurrentEntryOptions options) → void
The updateCurrentEntry() method of the Navigation interface updates the state of the Navigation.currentEntry; used in cases where the state change will be independent of a navigation or reload.

Operators

operator ==(Object other) bool
The equality operator.
inherited