3 ms·
The animation API is likely more efficient/smoother if it lets the browser offload the animation to separate threads without blocking the event loop or having t
by the8472 3y ago
The animation API is likely more efficient/smoother if it lets the browser offload the animation to separate threads without blocking the event loop or having to rerun layout. Any script-triggered CSS change is "unexpected" from a layout engine perspective. Registering your animation in advance makes it an expected change.