Returns `true` if the element is scrollable
(element: Element)
| 12 | |
| 13 | /** Returns `true` if the element is scrollable */ |
| 14 | function isScrollable(element: Element) { |
| 15 | const hasScrollableContent = element.scrollHeight > element.clientHeight |
| 16 | |
| 17 | return hasScrollableContent && !(window.getComputedStyle(element).overflowY.indexOf('hidden') !== -1) |
| 18 | } |
no outgoing calls
no test coverage detected