Added the requestAnimationFrame function on window