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

Restores previously saved focus-related state.

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


Parameters

[options.layer='current']
optional

The layer on which to restore focus-related state.

Type: up.Layer | string
[options.location]
optional

The URL for which to restore focus-related state.

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

Type: string

Return value

Returns whether focus state could be restored.

Type: boolean