MDN Web Docs

Syntax

js

new PopStateEvent(type, options)

Parameters

type

A string with the name of the event. It is case-sensitive and browsers set it to popstate.

options Optional

An object that, in addition to the properties defined in Event(), has the following property:

state Optional

An object representing the state. Practically it is a value provided by the call to history.pushState() or history.replaceState(). If not set, it defaults to null.

Return value

A new PopStateEvent object.

Specifications

Specification
HTML
# the-popstateevent-interface

Browser compatibility

See also

Help improve MDN

Yes No

Learn how to contribute

This page was last modified on by MDN contributors.

Read the original on developer.mozilla.org ↗