Allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.

interface History {
    length: number;
    scrollRestoration: ScrollRestoration;
    state: any;
    back(): void;
    forward(): void;
    go(delta?: number): void;
    pushState(data: any, unused: string, url?: null | string | URL): void;
    replaceState(data: any, unused: string, url?: null | string | URL): void;
}

Properties

length: number
scrollRestoration: ScrollRestoration
state: any

Methods

  • Returns void

  • Returns void

  • Parameters

    • Optionaldelta: number

    Returns void

  • Parameters

    • data: any
    • unused: string
    • Optionalurl: null | string | URL

    Returns void

  • Parameters

    • data: any
    • unused: string
    • Optionalurl: null | string | URL

    Returns void