I have a question about Google Chrome and Timeline tab in DevTools. I use window.requestAnimationFrame() with recursive call:
function animateRequestAnimationFrame(element, animation, timing, time) {
(function nextAnimationFrame() {
window.requestAnimationFrame(function (elapsed) {
var progress = elapsed / time;
if (progress < 1) {
animation(element, timing(progress));
nextAnimationFrame();
} else {
animation(element, timing(1));
}
});
})();
}
In timeline i see this: . Why every RequestAnimationFrame callbacks are not at start of a frames?
Because that's the definition of
requestAnimationFrame
: