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

Function scrollNodeToHorizontal

test/browser/waypoint_test.jsx:1396–1406  ·  view source on GitHub ↗
(node, scrollLeft)

Source from the content-addressed store, hash-verified

1394
1395// smoke tests for horizontal scrolling
1396function scrollNodeToHorizontal(node, scrollLeft) {
1397 if (node === window) {
1398 window.scroll(scrollLeft, 0);
1399 } else {
1400 // eslint-disable-next-line no-param-reassign
1401 node.scrollLeft = scrollLeft;
1402 }
1403 const event = document.createEvent('Event');
1404 event.initEvent('scroll', false, false);
1405 node.dispatchEvent(event);
1406}
1407
1408describe('<Waypoint> Horizontal', () => {
1409 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…