animationFrame
animationFrame
Planificador Animation Frame
Firma
Descripción
Ejemplo
// html: <div style="background: #0ff;"></div>
import { animationFrameScheduler } from "rxjs";
const div = document.querySelector("div");
animationFrameScheduler.schedule(
function (height) {
div.style.height = height + "px";
this.schedule(height + 1); // `this` referencia a la acción que se está ejecutando,
// que se replanifica con un nuevo estado
},
0,
0
);
// Se podrá observar un incremento en la altura de un elemento divLast updated