--- title: AnimationEvent.elapsedTime slug: Web/API/AnimationEvent/elapsedTime tags: - AnimationEvent - Animações Web - Apps - CSSOM - Experimental - Propriedade - Referencia translation_of: Web/API/AnimationEvent/elapsedTime ---
{{SeeCompatTable}}{{ apiref("Web Animations API") }}
O AnimationEvent.elapsedTime
é uma propriedade só de leitura com um ponto flutuante dando a quantidade de tempo que animação esteve rodando, em segundos, quando o evento termina, excluirá o tempo em que ela esteve em pausa. Para um evento "animationstart"
, elapsedTime
é 0.0
a não ser que tenha um valor negativo para {{cssxref("animation-delay")}}, nesse caso o evento irá terminar com elapsedTime
contendo (-1 *
delay)
.
time = AnimationEvent.elapsedTime
Specification | Status | Comment |
---|---|---|
{{ SpecName('CSS3 Animations', '#AnimationEvent-elapsedTime', 'AnimationEvent.elapsedTime') }} | {{ Spec2('CSS3 Animations')}} | Initial definition. |
{{ CompatibilityTable }}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{ CompatGeckoDesktop("6.0") }} | 10.0 | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{ CompatGeckoMobile("6.0") }} | 10.0 | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatChrome(43.0)}} |