export function scrollRequest (handleUpdate) {
const loop = () => {
handleUpdate(window.pageYOffset, () => {
window.requestAnimationFrame(loop)
})
}
loop()
}
export function scrollEvent (handleUpdate) {
document.addEventListener('scroll', (event) => {
handleUpdate(window.pageYOffset)
})
}