MDN self-hosted library · e01.org

Animation: id property

Web Animations

Open notebook · 1 cells web-api-instance-property upstream source

Web Animations

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:

redQueenAlice.id = "redQueenAlice";

Specifications

Browser compatibility

See also