KeepScrollOptions.storageKey
property · packages/primitives/src/dom/scroll.ts:46
readonly storageKey?: string | undefinedThe sessionStorage key holding entry offsets. Default 'foldkit:scroll'.
Primitives / foldkit-primitives/dom
interface · packages/primitives/src/dom/scroll.ts:44
interface KeepScrollOptions {
readonly storageKey?: string | undefined
readonly kept?: number | undefined
readonly patience?: number | undefined
readonly scroller?: (() => Element | null) | undefined
}How keepScroll remembers and restores each history entry's offset.
KeepScrollOptions.storageKeyproperty · packages/primitives/src/dom/scroll.ts:46
readonly storageKey?: string | undefinedThe sessionStorage key holding entry offsets. Default 'foldkit:scroll'.
KeepScrollOptions.keptproperty · packages/primitives/src/dom/scroll.ts:48
readonly kept?: number | undefinedEntries remembered at most: the oldest are forgotten first. Default 50.
KeepScrollOptions.patienceproperty · packages/primitives/src/dom/scroll.ts:54
readonly patience?: number | undefinedThe longest a restore holds its place while the next screen settles, in milliseconds: the hold ends sooner, once the page is at the offset and its height has stood still for two frames. Default 10000.
KeepScrollOptions.scrollerproperty · packages/primitives/src/dom/scroll.ts:59
readonly scroller?: (() => Element | null) | undefinedThe element that scrolls in place of the window, looked up each time it
is read (null while it is not drawn). Default: the window.