Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年7月.
currentTime はウェブアニメーション API の AnimationTimeline インターフェイスの読み取り専用のプロパティで、タイムラインの現在時刻をミリ秒単位で返します。タイムラインがアクティブでない場合は null を返します。
タイムラインの現在時刻をミリ秒で表します。タイムラインがアクティブでない場合は null です。
タイミング攻撃やフィンガープリンティングから保護するために、 animationTimeline.currentTime の精度はブラウザー設定によっては丸められている可能性があります。Firefox では、privacy.reduceTimerPrecision 環境設定が既定で有効になっており、既定は 2ms です。privacy.resistFingerprinting を有効にすることもできます。その場合、精度は 100ms または privacy.resistFingerprinting.reduceTimerPrecision.microseconds の値のどちらか大きい方になります。
例えば、時間の精度を下げた場合、animationTimeline.currentTime の結果は常に 0.002 の倍数になり、privacy.resistFingerprinting を有効にした場合は 0.1 の倍数(または privacy.resistFingerprinting.reduceTimerPrecision.microseconds)になります。
| Web Animations # dom-animationtimeline-currenttime |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2024年8月12日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.