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