Animation: id プロパティ

Baseline 2022

Newly available

Since September 2022, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Animation.idウェブアニメーション API のプロパティで、このアニメーションを識別する文字列を返したり設定したりします。

アニメーションを識別するために使用することができる文字列、またはアニメーションに id がない場合は null です。

以下の White Rabbit の例では、 rabbitDownAnimationid に割り当てています。

js
rabbitDownAnimation.id = "rabbitGo";

仕様書

Specification
Web Animations
# dom-animation-id

ブラウザーの互換性

BCD tables only load in the browser

関連情報