Animation: id-Eigenschaft

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.

Die Animation.id-Eigenschaft der Web Animations API gibt einen String zurück oder setzt diesen, um die Animation zu identifizieren.

Wert

Ein String, der verwendet werden kann, um die Animation zu identifizieren, oder null, wenn die Animation keine id hat.

Beispiele

Im Beispiel "Follow the White Rabbit" können Sie der rabbitDownAnimation eine id wie folgt zuweisen:

js
rabbitDownAnimation.id = "rabbitGo";

Spezifikationen

Specification
Web Animations
# dom-animation-id

Browser-Kompatibilität

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

Siehe auch