(el: HTMLElement | typeof window, top: number)
| 185 | } |
| 186 | |
| 187 | export function scrollTo(el: HTMLElement | typeof window, top: number): void { |
| 188 | // with a scroll distance, we perform scroll on the element |
| 189 | if (isDocumentElement(el)) { |
| 190 | window.scrollTo(0, top); |
| 191 | return; |
| 192 | } |
| 193 | |
| 194 | el.scrollTop = top; |
| 195 | } |
| 196 | |
| 197 | // Get Scroll Parent |
| 198 | // ------------------------------ |
no test coverage detected
searching dependent graphs…