We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Web Animations API's cancel() method of the Animation interface clears all KeyframeEffects caused by this animation and aborts its playback.

When an animation is cancelled, its startTime and currentTime are set to null.





Return value



This method doesn't directly throw exceptions; however, if the animation's playState is anything but "idle" when cancelled, the current finished promise is rejected with a DOMException named AbortError.


Specification Status Comment
Web Animations
The definition of 'Animation.cancel()' in that specification.
Working Draft Editor's draft.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support39 ?48 No26 No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support3939 ?4826 No ?

See also

Document Tags and Contributors

 Contributors to this page: fscholz, jpmedley, birtles, Sheppy, chrisdavidmills, rachelnabors
 Last updated by: fscholz,