MCPcopy Index your code
hub / github.com/streamich/react-use / setWindowScroll

Function setWindowScroll

tests/useWindowScroll.test.tsx:32–35  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

30 }
31
32 function setWindowScroll(x: number, y: number) {
33 (window.pageXOffset as number) = x;
34 (window.pageYOffset as number) = y;
35 }
36
37 function triggerScroll(dimension: 'x' | 'y', value: number) {
38 if (dimension === 'x') {

Callers 2

TestComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…