This feature is experimental. Please share your experiences so we know what to keep or change.
Saves focus-related state for later restoration.
Saved state includes:
State can only be preserved if the focused element is targetable.
Saved state will be associated with the given layer's location.
It can later be restored by calling up.viewport.restoreScroll()
at the same location, or by following a link with an [up-focus="restore"]
attribute to that same location.
Unpoly automatically saves focus-related state before navigating.
The viewports for which to save focus state.
Defaults to all viewports within the given layer.
The URL for which to save focus state.
If omitted, the given layer's location is used.
The layer for which to save scroll positions.
If omitted, state for the current layer will be saved.