Primitives / foldkit-primitives/dom

keepScroll

function · packages/primitives/src/dom/scroll.ts:163

function keepScroll(options?: KeepScrollOptions): Stream.Stream<never>

Keeps the window's scroll across same-document navigations: a pushed entry starts at the top, and Back, Forward or a reload return where that entry was. Without a window the stream is empty instead of throwing. Lift with Subscription.persistentEntry; the stream sends no Messages.