Interface History
interface History {
length: number;
scrollRestoration: ScrollRestoration;
state: any;
back(): void;
forward(): void;
go(delta?: number): void;
pushState(data: any, unused: string, url?: string | URL): void;
replaceState(data: any, unused: string, url?: string | URL): void;
}
length: number;
scrollRestoration: ScrollRestoration;
state: any;
back(): void;
forward(): void;
go(delta?: number): void;
pushState(data: any, unused: string, url?: string | URL): void;
replaceState(data: any, unused: string, url?: string | URL): void;
}
Allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.
MDN Reference