(el)
| 131 | } |
| 132 | }; |
| 133 | function isElementVisible(el) { |
| 134 | const rect = el.getBoundingClientRect(); |
| 135 | return rect.top < window.innerHeight && rect.top > 0 && rect.bottom >= 0; |
| 136 | } |
| 137 | function findFirstVisibleElement(selector) { |
| 138 | const elements = document.querySelectorAll(selector); |
| 139 | const firstVisibleElement = Array.from(elements).find(el => { |
no outgoing calls
no test coverage detected