1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
---
title: AnimationEvent
slug: Web/API/AnimationEvent
tags:
- API
- Animaciones Web
- Experimental
- Interface
- Referencia
translation_of: Web/API/AnimationEvent
---
<p>{{SeeCompatTable}}{{APIRef("Web Animations API")}}</p>
<p>La interfaz <strong><code>AnimationEvent</code></strong> representa los eventos que proporciona información relacionada con las <a href="/en-US/docs/Web/Guide/CSS/Using_CSS_animations">animaciones</a>.</p>
<p>{{InheritanceDiagram}}</p>
<h2 id="Propiedades">Propiedades</h2>
<p><em>También hereda las propiedades de su padre {{domxref("Event")}}</em>.</p>
<dl>
<dt>{{domxref("AnimationEvent.animationName")}} {{readonlyInline}}</dt>
<dd>Es un {{domxref("DOMString")}} que contiene el valor de la propiedad CSS {{cssxref("animation-name")}} asociado con la transición.</dd>
<dt>{{domxref("AnimationEvent.elapsedTime")}} {{readonlyInline}}</dt>
<dd>Es un número flotante que da la cantidad de tiempo que ha estado corriendo la animación, en segundos, cuando este evento es disparado, excluyendo cualquier vez que la aimación fue pausada. Para un evento <code>"animationstart"</code>, <code>elapsedTime</code> es <code>0.0</code> a ménos que hubiera un valor negativo para {{cssxref("animation-delay")}}, en tal caso sería disparado el evento con <code>elapsedTime</code> conteniendo <code>(-1 * </code><em>retraso</em><code>)</code>.</dd>
<dt>{{domxref("AnimationEvent.pseudoElement")}} {{readonlyInline}}</dt>
<dd>Es un {{domxref("DOMString")}}, empezando con <code>'::'</code>, conteniendo el nombre del <a href="/en-US/docs/Web/CSS/Pseudo-elements" title="/en-US/docs/Web/CSS/Pseudo-elements">pseudo-element</a> en el cual corre la animación. Si la animación no corre sobre un pseudo-element sino en el elemento, un string vacío: ''. </dd>
</dl>
<h2 id="Constructor">Constructor</h2>
<dl>
<dt>{{domxref("AnimationEvent.AnimationEvent", "AnimationEvent()")}}</dt>
<dd>Crea un evento <code>AnimationEvent</code> con los parametros dados.</dd>
</dl>
<h2 id="Métodos">Métodos</h2>
<p><em>También hereda los métodos de su padre {{domxref("Event")}}</em>.</p>
<dl>
<dt>{{domxref("AnimationEvent.initAnimationEvent()")}} {{non-standard_inline}}{{deprecated_inline}}</dt>
<dd>Inicializa un evento <code>AnimationEvent</code> creado utilizando el método obsoleto {{domxref("Document.createEvent()", "Document.createEvent(\"AnimationEvent\")")}}</dd>
</dl>
<h2 id="Especificaciones">Especificaciones</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Especificación</th>
<th scope="col">Estatus</th>
<th scope="col">Comentario</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ SpecName('CSS3 Animations', '#AnimationEvent-interface', 'AnimationEvent') }}</td>
<td>{{ Spec2('CSS3 Animations') }}</td>
<td>Definición inicial.</td>
</tr>
</tbody>
</table>
<h2 id="Compatibilidad_de_Navegadores">Compatibilidad de Navegadores</h2>
{{Compat("api.AnimationEvent")}}
<h2 id="Ver_también">Ver también</h2>
<ul>
<li><a href="/en-US/docs/CSS/Using_CSS_animations">Usando animaciones CSS</a></li>
<li>Las propiedades CSS referentes a animación y reglas: {{cssxref("animation")}}, {{cssxref("animation-delay")}}, {{cssxref("animation-direction")}}, {{cssxref("animation-duration")}}, {{cssxref("animation-fill-mode")}}, {{cssxref("animation-iteration-count")}}, {{cssxref("animation-name")}}, {{cssxref("animation-play-state")}}, {{cssxref("animation-timing-function")}}, {{cssxref("@keyframes")}}.</li>
</ul>
|