(element: HTMLElement)
| 3 | import { Watcher } from './watcher.js'; |
| 4 | |
| 5 | function getViewportHeight(element: HTMLElement) { |
| 6 | if (isOnServer) { |
| 7 | return 0; |
| 8 | } |
| 9 | if(typeof window !== 'undefined'){ |
| 10 | return window.innerHeight; |
| 11 | } |
| 12 | if (element === document.body) { |
| 13 | return document.documentElement.clientHeight; |
| 14 | } else { |
| 15 | return element.clientHeight; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | function getContentHeight(element: HTMLElement) { |
| 20 | if (isOnServer) { |
no outgoing calls
no test coverage detected