Edit this page

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

Restores previously saved focus-related state.

Unpoly automatically restores focus-related state when the user presses the back button.


Parameters

[viewport]
optional

The viewports for which to restore focus-related state..

Defaults to all viewports within the given layer.

[options.layer='current']
optional

The layer on which to restore focus-related state.

up.Layerstring
[options.location]
optional

The URL for which to restore focus-related state.

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

string

Return value

Returns whether focus state could be restored.

boolean