NavigateEvent Class
https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-navigateevent-interface: fired at the navigation API object of a window when its navigable navigates. Its listeners can cancel the navigation, or intercept it to convert it into a same-document navigation.
public sealed class NavigateEvent : Event- Inheritance
EventNavigateEvent
Constructors
| Name | Description |
|---|---|
| NavigateEvent(string, NavigateEventInit) | Creates a navigate event of the given type with the given initialization dictionary. |
Properties
| Name | Description |
|---|---|
| CanIntercept | Gets a value indicating whether the navigation can be intercepted to become a same-document navigation. |
| Destination | Gets the destination of the navigation. |
| DownloadRequest | Gets the download attribute value of the link that started the navigation, or null. |
| FormData | Gets the data of the form submission that started the navigation, if any. |
| HasUAVisualTransition | Gets a value indicating whether the user agent already performed a visual transition for the navigation. |
| HashChange | Gets a value indicating whether the navigation only changes the fragment of the URL. |
| Info | The info given to the navigation API method that started the navigation (a value of the script engine), or null for undefined. |
| NavigationType | The navigation type; a precommit handler can change a "push" to a "replace" and conversely. |
| Signal | Gets the signal that is aborted when the navigation is canceled. |
| SourceElement | Gets the element that started the navigation, or null. |
| UserInitiated | Gets a value indicating whether the navigation is initiated by the user. |
CanIntercept
NavigationEvents.csGets a value indicating whether the navigation can be intercepted to become a same-document navigation.
public bool CanIntercept { get; }Destination
NavigationEvents.csGets the destination of the navigation.
public NavigationDestination Destination { get; }DownloadRequest
NavigationEvents.csGets the download attribute value of the link that started the navigation, or null.
public string? DownloadRequest { get; }FormData
NavigationEvents.csGets the data of the form submission that started the navigation, if any.
public FormData? FormData { get; }HasUAVisualTransition
NavigationEvents.csGets a value indicating whether the user agent already performed a visual transition for the navigation.
public bool HasUAVisualTransition { get; }HashChange
NavigationEvents.csGets a value indicating whether the navigation only changes the fragment of the URL.
public bool HashChange { get; }The info given to the navigation API method that started the navigation (a value of the script engine), or null for undefined.
public object? Info { get; }Signal
NavigationEvents.csGets the signal that is aborted when the navigation is canceled.
public AbortSignal Signal { get; }SourceElement
NavigationEvents.csGets the element that started the navigation, or null.
public Element? SourceElement { get; }UserInitiated
NavigationEvents.csGets a value indicating whether the navigation is initiated by the user.
public bool UserInitiated { get; }Methods
| Name | Description |
|---|---|
| Intercept(NavigationInterceptOptions?) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigateevent-intercept |
| Scroll() | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigateevent-scroll: processes the scroll behavior of the navigation now. |
Scroll()
NavigationEvents.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigateevent-scroll: processes the scroll behavior of the navigation now.
public void Scroll()