1 export function isVisible(element: HTMLElement): boolean {
2 const rect = element.getBoundingClientRect();
6 rect.top <= (window.innerHeight || document.documentElement.clientHeight) &&
7 rect.right <= (window.innerWidth || document.documentElement.clientWidth)