MCPcopy
hub / github.com/civiccc/react-waypoint / scrollNodeTo

Function scrollNodeTo

test/browser/waypoint_test.jsx:17–27  ·  view source on GitHub ↗
(node, scrollTop)

Source from the content-addressed store, hash-verified

15}
16
17function scrollNodeTo(node, scrollTop) {
18 if (node === window) {
19 window.scroll(0, scrollTop);
20 } else {
21 // eslint-disable-next-line no-param-reassign
22 node.scrollTop = scrollTop;
23 }
24 const event = document.createEvent('Event');
25 event.initEvent('scroll', false, false);
26 node.dispatchEvent(event);
27}
28
29describe('<Waypoint>', () => {
30 let props;

Callers 1

waypoint_test.jsxFile · 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…