MCPcopy Create free account
hub / github.com/Lobos/react-ui / getScrollTop

Function getScrollTop

src/utils/dom.js:63–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61}
62
63export function getScrollTop () {
64 const dd = document.documentElement;
65 let scrollTop = 0;
66 if (dd && dd.scrollTop) {
67 scrollTop = dd.scrollTop;
68 } else if (document.body) {
69 scrollTop = document.body.scrollTop;
70 }
71 return scrollTop;
72}
73
74export function overView (el, pad = 0) {
75 let height = window.innerHeight || document.documentElement.clientHeight;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…