Animation: id property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2020.

The Animation.id property of the Web Animations API returns or sets a string used to identify the animation.

Value

A string which can be used to identify the animation, or null if the animation has no id.

Examples

In the Follow the White Rabbit example, you can assign the rabbitDownAnimation an id like so:

js
rabbitDownAnimation.id = "rabbitGo";

Specifications

Specification
Web Animations
# dom-animation-id

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
id

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

See also