Interface NavigationHistoryEntry
id: string;
index: number;
key: string;
ondispose: ((this: NavigationHistoryEntry, ev: Event) => any) | null;
sameDocument: boolean;
url: string | null;
addEventListener<K extends "dispose">(
type: K,
listener: (
this: NavigationHistoryEntry,
ev: NavigationHistoryEntryEventMap[K],
) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
dispatchEvent(event: Event): boolean;
getState(): any;
removeEventListener<K extends "dispose">(
type: K,
listener: (
this: NavigationHistoryEntry,
ev: NavigationHistoryEntryEventMap[K],
) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
}
Hierarchy
- EventTarget
- NavigationHistoryEntry
Index
Properties
Methods
Properties
Readonlyid
The id read-only property of the NavigationHistoryEntry interface returns the id of the history entry, or an empty string if current document is not fully active.
Readonlyindex
The index read-only property of the NavigationHistoryEntry interface returns the index of the history entry in the history entries list (that is, the list returned by Navigation.entries()), or -1 if the entry does not appear in the list or if current document is not fully active.
Readonlykey
The key read-only property of the NavigationHistoryEntry interface returns the key of the history entry, or an empty string if current document is not fully active.
ondispose
ReadonlysameDocument
The sameDocument read-only property of the NavigationHistoryEntry interface returns true if this history entry is for the same document as the current Document value and current document is fully active, or false otherwise.
Readonlyurl
The url read-only property of the NavigationHistoryEntry interface returns the absolute URL of this history entry.
Methods
addEventListener
- addEventListener<K extends "dispose">(
type: K,
listener: (
this: NavigationHistoryEntry,
ev: NavigationHistoryEntryEventMap[K],
) => any,
options?: boolean | AddEventListenerOptions,
): voidThe
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.Type Parameters
- K extends "dispose"
Parameters
- type: K
- listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any
Optionaloptions: boolean | AddEventListenerOptions
Returns void
- addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): voidThe
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | AddEventListenerOptions
Returns void
dispatchEvent
The
dispatchEvent()method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.Parameters
- event: Event
Returns boolean
getState
The
getState()method of the NavigationHistoryEntry interface returns a clone of the developer-supplied state associated with this history entry.Returns any
removeEventListener
- removeEventListener<K extends "dispose">(
type: K,
listener: (
this: NavigationHistoryEntry,
ev: NavigationHistoryEntryEventMap[K],
) => any,
options?: boolean | EventListenerOptions,
): voidThe
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.Type Parameters
- K extends "dispose"
Parameters
- type: K
- listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any
Optionaloptions: boolean | EventListenerOptions
Returns void
- removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): voidThe
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | EventListenerOptions
Returns void
The
NavigationHistoryEntryinterface of the Navigation API represents a single navigation history entry.MDN Reference