MCPcopy Index your code
hub / github.com/toddmotto/echo / inView

Function inView

src/echo.js:25–32  ·  view source on GitHub ↗
(element, view)

Source from the content-addressed store, hash-verified

23 };
24
25 var inView = function (element, view) {
26 if (isHidden(element)) {
27 return false;
28 }
29
30 var box = element.getBoundingClientRect();
31 return (box.right >= view.l && box.bottom >= view.t && box.left <= view.r && box.top <= view.b);
32 };
33
34 var debounceOrThrottle = function () {
35 if(!useDebounce && !!poll) {

Callers 1

echo.jsFile · 0.85

Calls 1

isHiddenFunction · 0.85

Tested by

no test coverage detected