Web Animations API Playground

The teacher holds the Animation remote from box.animate(): write your own keyframes, play, pause, reverse or cancel, and the board reads playState…

Why it matters

CSS animations are hard to drive from JS (at most you swap a class). Hand-made requestAnimationFrame animations work out every frame themselves. WAAPI sits in between: declarative like CSS, yet it can be paused, reversed, jumped and awaited through anim.finished.

The key idea

Keyframes are JS objects, and what comes back is the remote

Common mistakes

Try it in this playground