Path: blob/main/files/en-us/web/api/animation/commitstyles/index.md
6510 views
------{{APIRef("Web Animations")}}
The commitStyles() method of the Web Animations API's {{domxref("Animation")}} interface commits the end styling state of an animation to the element being animated, even after that animation has been removed. It will cause the end styling state to be written to the element being animated, in the form of properties inside a style attribute.
Syntax
Parameters
None.
Return value
None ({{jsxref("undefined")}}).
Examples
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{domxref("Animation")}} for other methods and properties you can use to control web page animation.