History : Object
Represents the history of pages displayed to the user. Allows the webpage to manipulate the history by adding new pages or navigating between pages already in the history. Use the
window.onpopstate
event to listen to the user changing the page through the browser's back/forward buttons. See also Location.Instance Properties
state : Object
The data passed to pushState()
or replaceState()
for the current page.
Example:
RunResults:
Instance Methods
Navigates through the session history by the specified amount. If delta
is not provided, go()
acts the same as location.reload()
and reloads the current page. See also back()
and forward()
.
Example:
RunResults:
Adds a new entry to the session history. state
is available on the history.state
property. title
is applied to document.title
. If url
is specified, the location.href
is changed to the provided value.
Example:
RunResults:
Replaces the current entry in the session history with the provided values. state
is available on the history.state
property. title
is applied to document.title
. If url
is specified, the location.href
is changed to the provided value.
Example:
RunResults:
Copyright © JavaScripture Contributors