Use requestAnimationFrame inside scroll event handler