(element)
| 11513 | } |
| 11514 | |
| 11515 | function isInViewPort(element) { |
| 11516 | const viewWidth = window.innerWidth || document.documentElement.clientWidth; |
| 11517 | const viewHeight = window.innerHeight || document.documentElement.clientHeight; |
| 11518 | const { |
| 11519 | top, |
| 11520 | right, |
| 11521 | bottom, |
| 11522 | left |
| 11523 | } = element.getBoundingClientRect(); |
| 11524 | |
| 11525 | return ( |
| 11526 | top >= 0 && |
| 11527 | left >= 0 && |
| 11528 | right <= viewWidth + 1 && |
| 11529 | top <= viewHeight * rate && |
| 11530 | isVisible(element, _unsafeWindow) |
| 11531 | ); |
| 11532 | } |
| 11533 | |
| 11534 | function getPageBar() { |
| 11535 | let preBar = null, nextBar = null; |
no test coverage detected