Animation.id
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.
La propiedad Animation.id
de la Web Animations API devuelve o establece una cadena(string) utilizado para identificar la animación.
Sintaxis
js
var animationsId = Animation.id;
Animation.id = newIdString;
Valor
Un DOMString
que se puede usar para identificar la animación, o null
si la animación no tiene id
.
Ejemplos
En el ejemplo Follow the White Rabbit, puedes asignar a rabbitDownAnimation
un id
de esta manera:
js
rabbitDownAnimation.effect.id = "rabbitGo";
Especificaciones
Specification |
---|
Web Animations # dom-animation-id |
Compatibilidad con navegadores
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.