HTML5 window.requestAnimationFrame API is an alternative to setTimeout for animations or applications running in a loop.