Edit this page

up.history up:location:restore
DOM event

This event is emitted when the user is restoring a previous history entry, usually by pressing the back button.

Listeners may prevent up:location:restore or mutate event.renderOptions to customize the restoration behavior.


Event properties

event.location string

The URL for the restored history entry.

event.renderOptions Object

An object with render options for the render pass that will restore content for this history entry.

Listeners may inspect and modify these options. Render options cannot stop the browser from restoring the URL in the address bar.

event.preventDefault()

Prevent Unpoly from restoring content for this history entry.

Preventing the event will not stop the browser from restoring the URL in the address bar.