MCPcopy Create free account
hub / github.com/DenOfEquity/ersatzForge / uiElementInSight

Function uiElementInSight

script.js:198–204  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

196 const computedStyle = getComputedStyle(el);
197 const isVisible = computedStyle.display !== "none";
198
199 if (!isVisible) return false;
200 return uiElementIsVisible(el.parentNode);
201}
202
203function uiElementInSight(el) {
204 const clRect = el.getBoundingClientRect();
205 const windowHeight = window.innerHeight;
206 const isOnScreen = clRect.bottom > 0 && clRect.top < windowHeight;
207

Callers 1

dragdrop.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected