AnimationPlaybackEvent: currentTime property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{ APIRef("Web Animations") }}

The **currentTime** read-only property of the {{domxref("AnimationPlaybackEvent")}} interface represents the current time of the animation that generated the event at the moment the event is queued. For browser-generated cancel events, the value is null.

Value

A number representing the current time in milliseconds, or null.

When a value is supplied to the {{domxref("AnimationPlaybackEvent/AnimationPlaybackEvent", "AnimationPlaybackEvent()")}} constructor, Chrome and Firefox do not apply timer rounding to the returned value. In Safari, the browser rounds the returned value to 0.001 ms, the resolution used to represent animation times.

For browser-generated finish and remove events, this property inherits the value and precision of {{domxref("Animation.currentTime")}} when the event is queued, without introducing additional inaccuracy.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • Web Animations API
  • {{domxref("AnimationPlayBackEvent")}}