Navigation Class
The navigation API of a window (https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api): the same-origin session history entries of its navigable, the navigations of the navigable (the navigate event, which can cancel or intercept them), and the methods that navigate and traverse.
public sealed class Navigation : EventTargetRemarks
The states are serialized by the script engine of the window. The promises of the results and of the transitions are settled by the tasks of the event loop. The exceptions that reject them are created in the realm of the window.
See also
- Inheritance
EventTargetNavigation
Properties
| Name | Description |
|---|---|
| Activation | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-activation |
| CanGoBack | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-cangoback |
| CanGoForward | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-cangoforward |
| CurrentEntry | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-currententry |
| OnCurrentEntryChange | Gets or sets the event handler of the currententrychange event. |
| OnNavigate | Gets or sets the event handler of the navigate event. |
| OnNavigateError | Gets or sets the event handler of the navigateerror event. |
| OnNavigateSuccess | Gets or sets the event handler of the navigatesuccess event. |
| Transition | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-transition |
Activation
NavigationApi.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-activation
public NavigationActivation? Activation { get; }CanGoBack
NavigationApi.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-cangoback
public bool CanGoBack { get; }CanGoForward
NavigationApi.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-cangoforward
public bool CanGoForward { get; }CurrentEntry
NavigationApi.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-currententry
public NavigationHistoryEntry? CurrentEntry { get; }OnCurrentEntryChange
NavigationApi.csGets or sets the event handler of the currententrychange event.
Transition
NavigationApi.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-transition
public NavigationTransition? Transition { get; }Methods
| Name | Description |
|---|---|
| Back(NavigationOptions?) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-back |
| Entries() | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-entries |
| Forward(NavigationOptions?) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-forward |
| Navigate(string, NavigationNavigateOptions?) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-navigate |
| Reload(NavigationReloadOptions?) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-reload |
| TraverseTo(string, NavigationOptions?) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-traverseto |
| UpdateCurrentEntry(NavigationUpdateCurrentEntryOptions) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-updatecurrententry |
Entries()
NavigationApi.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-entries
public IReadOnlyList<NavigationHistoryEntry> Entries()