Class HashChangeEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The HashChangeEvent interface represents events that fire when the fragment identifier of the URL has changed.
[Value("HashChangeEvent")]
public class HashChangeEvent : Event
- Inheritance
-
HashChangeEvent
- Inherited Members
Remarks
The fragment identifier is the part of the URL that follows (and includes) the # symbol.
Constructors
HashChangeEvent()
public HashChangeEvent()
HashChangeEvent(string, HashChangeEventInit)
The HashChangeEvent() constructor creates a new HashChangeEvent object, that is used by the Windowhashchange event fired at the Window object when the fragment of the URL changes.
public HashChangeEvent(string type, HashChangeEventInit eventInitDict = null)
Parameters
typestringeventInitDictHashChangeEventInit
Remarks
NOTE
A web developer doesn't typically need to call this constructor, as the browser creates these objects itself when firing Windowhashchange events.
-Windowhashchange event
Properties
NewURL
The newURL read-only property of the
HashChangeEvent interface returns the new URL to which the window is
navigating.
[Value("newURL")]
public string NewURL { get; }
Property Value
- string
A string.
Remarks
OldURL
The oldURL read-only property of the
HashChangeEvent interface returns the previous URL from which the window
was navigated.
[Value("oldURL")]
public string OldURL { get; }
Property Value
- string
A string.