Animation.id
The Animation.id
property of the Web Animations API returns or sets a string used to identify the animation.
Value
A DOMString
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:
rabbitDownAnimation.effect.id = "rabbitGo";
Specifications
Specification |
---|
Web Animations # dom-animation-id |
Browser compatibility
BCD tables only load in the browser