pinafore/routes/_utils/scrollContainer.js

12 lines
279 B
JavaScript
Raw Normal View History

export function getScrollContainer () {
return document.scrollingElement
}
export function addScrollListener (listener) {
document.addEventListener('scroll', listener)
}
export function removeScrollListener (listener) {
document.removeEventListener('scroll', listener)
}