(container: HTMLElement)
| 24 | } |
| 25 | |
| 26 | function scrollRoot(container: HTMLElement) { |
| 27 | let node = container.parentElement |
| 28 | while (node) { |
| 29 | const style = getComputedStyle(node) |
| 30 | if (scrollable(style.overflowY)) return node |
| 31 | node = node.parentElement |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | function target(container: HTMLElement): Target | undefined { |
| 36 | if (typeof document === "undefined") return |