Edit this page

up.viewport up.viewport.restoreScroll([viewport], [options])
JavaScript function

Restores previously saved scroll positions.

If no earlier scroll position is known, scroll positions are not changed and false is returned.

Unpoly automatically restores scroll positions when the user presses the back button.


Parameters

[viewport]
optional

The viewports for which to restore scroll positions.

Defaults to all viewports within the given layer.

[options.layer='current']
optional

The layer on which to restore scroll positions.

up.Layerstring
[options.location]
optional

The URL for which to restore scroll positions.

If omitted, the given layer's location is used.

string

Return value

Returns whether scroll positions could be restored.

boolean