Ah, I think the reason that this animation loop using promises works is because promise handlers resolve in the next microtask after the current macrotask. I believe that the animation frame fires in what is essentially a macrotask, then immediately after this macrotask the resolution of the `animationFrame()` promise happens in the following microtask. At some point later, the browser renders stuff, which I think might the next macrotask after the animation frame macrotask.
*/#!/*JoePea
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

