Class NavigationCurrentEntryChangeEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalNavigationCurrentEntryChangeEvent interface of the {{domxref("Navigation API", "Navigation API", "", "nocode")}} is the event object for the Navigationcurrententrychange event, which fires when the CurrentEntry has changed.
[Value("NavigationCurrentEntryChangeEvent")]
public class NavigationCurrentEntryChangeEvent : Event
- Inheritance
-
NavigationCurrentEntryChangeEvent
- Inherited Members
Remarks
This event will fire for same-document navigations (e.g., Back(NavigationOptions) or TraverseTo(string, NavigationOptions)), replacements (i.e., a Navigate(string, NavigationNavigateOptions) call with history set to replace), or other calls that change the entry's state (e.g., UpdateCurrentEntry(NavigationUpdateCurrentEntryOptions), or the {{domxref("History API", "History API", "", "nocode")}}'s ReplaceState(dynamic, string, string?)).
This event fires after the navigation is committed, meaning that the visible URL has changed and the NavigationHistoryEntry update has occurred. It is useful for migrating from usage of older API features like the Windowhashchange or Windowpopstate events.
-Modern client-side routing: the Navigation API
-Navigation API explainer
-Navigation API live demo (view demo source)
Constructors
NavigationCurrentEntryChangeEvent()
public NavigationCurrentEntryChangeEvent()
NavigationCurrentEntryChangeEvent(string, NavigationCurrentEntryChangeEventInit)
NOTE
ExperimentalNavigationCurrentEntryChangeEvent() constructor creates a new NavigationCurrentEntryChangeEvent object.
public NavigationCurrentEntryChangeEvent(string type, NavigationCurrentEntryChangeEventInit eventInitDict)
Parameters
typestringeventInitDictNavigationCurrentEntryChangeEventInit
Remarks
Properties
From
NOTE
Experimentalfrom read-only property of the NavigationCurrentEntryChangeEvent interface returns the NavigationHistoryEntry that was navigated from.
[Value("from")]
public NavigationHistoryEntry From { get; }
Property Value
- NavigationHistoryEntry
A NavigationHistoryEntry object.
Remarks
NavigationType
NOTE
ExperimentalnavigationType read-only property of the NavigationCurrentEntryChangeEvent interface returns the type of the navigation that resulted in the change. The property may be null if the change occurs due to UpdateCurrentEntry(NavigationUpdateCurrentEntryOptions).
[Value("navigationType")]
public NavigationType? NavigationType { get; }
Property Value
- NavigationType?
An enumerated value representing the type of navigation.The possible values are: