MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / isVisible

Function isVisible

scripts/bot.js:396–402  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

394 }
395
396 function isVisible(el) {
397 var elemTop = el.getBoundingClientRect().top;
398 var elemBottom = el.getBoundingClientRect().bottom;
399
400 var isVisible = (elemTop >= 0) && (elemBottom <= window.innerHeight);
401 return isVisible;
402 }
403
404 return robot;
405}

Callers 1

botFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected