Table of Contents

Class NavigationDestination

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The NavigationDestination interface of the {{domxref("Navigation API", "Navigation API", "", "nocode")}} represents the destination being navigated to in the current navigation.
[Value("NavigationDestination")]
public class NavigationDestination
Inheritance
NavigationDestination
Inherited Members

Remarks

Constructors

NavigationDestination()

public NavigationDestination()

Properties

Id

NOTE
Experimental
The id read-only property of the
NavigationDestination interface returns the Id value of the destination NavigationHistoryEntry if the NavigationType is traverse, or an empty string otherwise.
[Value("id")]
public string Id { get; }

Property Value

string

A string representing the id of the destination NavigationHistoryEntry, or an empty string.

Remarks

The id is a unique, UA-generated value that always represents the history entry, useful to correlate a history entry with an external resource such as a storage cache.

-Modern client-side routing: the Navigation API
-Navigation API explainer

See also on MDN

Index

NOTE
Experimental
The index read-only property of the
NavigationDestination interface returns the Index value of the destination NavigationHistoryEntry if the NavigationType is traverse, or -1 otherwise.
[Value("index")]
public long Index { get; }

Property Value

long

A number representing the index of the destination NavigationHistoryEntry, or -1.

Remarks

Key

NOTE
Experimental
The key read-only property of the
NavigationDestination interface returns the Key value of the destination NavigationHistoryEntry if the NavigationType is traverse, or an empty string otherwise.
[Value("key")]
public string Key { get; }

Property Value

string

A string representing the key of the destination NavigationHistoryEntry, or an empty string.

Remarks

The key is a unique, UA-generated value that represents the history entry's slot in the history entries list, used to navigate to this place in the history via TraverseTo(string, NavigationOptions). It will be reused by other entries that replace the entry in the list (i.e., if the NavigationType is replace).

-Modern client-side routing: the Navigation API
-Navigation API explainer

See also on MDN

SameDocument

NOTE
Experimental
The sameDocument read-only property of the
NavigationDestination interface returns true if the navigation is to the same document as the current Document value, or false otherwise.
[Value("sameDocument")]
public bool SameDocument { get; }

Property Value

bool

A boolean.

Remarks

This is useful for checking whether the navigation will be same-document or cross-document.

-Modern client-side routing: the Navigation API
-Navigation API explainer

See also on MDN

Url

NOTE
Experimental
The url read-only property of the
NavigationDestination interface returns the URL being navigated to.
[Value("url")]
public string Url { get; }

Property Value

string

A string.

Remarks

Methods

GetState()

NOTE
Experimental
The getState() method of the
NavigationDestination interface returns a clone of the developer-supplied state associated with the destination NavigationHistoryEntry, or navigation operation (e.g., Navigate(string, NavigationNavigateOptions)) as appropriate.
[Value("getState")]
public dynamic GetState()

Returns

dynamic

A value representing the state. This can be any type.If no state is defined, it returns undefined.

Remarks