Class NavigationDestination
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalNavigationDestination 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
It is accessed via the Destination property.
-Modern client-side routing: the Navigation API
-Navigation API explainer
-Navigation API live demo (view demo source)
Constructors
NavigationDestination()
public NavigationDestination()
Properties
Id
NOTE
Experimentalid read-only property of theNavigationDestination 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
idof 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
Index
NOTE
Experimentalindex read-only property of theNavigationDestination 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
indexof the destination NavigationHistoryEntry, or -1.
Remarks
Key
NOTE
Experimentalkey read-only property of theNavigationDestination 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
keyof 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
SameDocument
NOTE
ExperimentalsameDocument read-only property of theNavigationDestination 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
Url
NOTE
Experimentalurl read-only property of theNavigationDestination interface returns the URL being navigated to.
[Value("url")]
public string Url { get; }
Property Value
- string
A string.
Remarks
Methods
GetState()
NOTE
ExperimentalgetState() method of theNavigationDestination 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.