3 ms·
Sure but in many situations a vanilla async function gives you the same result without the extra layer.
by geenat 3y ago
Sure but in many situations a vanilla async function gives you the same result without the extra layer.
- the8472 3y agoThe 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.
- o1y32 3y agoThere is no "extra layer" -- it is a browser API supported by every browser by bow, which means that it should be treated the same say as settimeout