1. Web
  2. Web APIs
  3. Animation
  4. id

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 Red Queen's Race Game example, you can assign the redQueenAlice an id like so:

js
redQueenAlice.id = "redQueenAlice";

Specifications

Specification
Web Animations
# dom-animation-id

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /