MCPcopy
hub / github.com/sveltejs/kit / restore_scroll

Function restore_scroll

packages/kit/src/runtime/client/client.js:327–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325 // recover scroll position
326 const scroll = scroll_positions[current_history_index];
327 function restore_scroll() {
328 if (scroll) {
329 history.scrollRestoration = 'manual';
330 scrollTo(scroll.x, scroll.y);
331 }
332 }
333
334 if (hydrate) {
335 restore_scroll();

Callers 1

startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected