blob: 7dcce65cfa93955b0840c31c57c7891e1ca16af2 (
plain)
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
|
---
title: Animation.id
slug: Web/API/Animation/id
tags:
- API
- Animacion
- Animaciones Web
- Experimental
- Reference
- id
translation_of: Web/API/Animation/id
---
<p>{{ SeeCompatTable() }}{{ APIRef("Web Animations") }}</p>
<p>La propiedad <code><strong>Animation</strong></code><strong><code>.id</code></strong> de la <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API">Web Animations API</a> devuelve o establece una cadena(string) utilizado para identificar la animación.</p>
<h2 id="Sintaxis">Sintaxis</h2>
<pre class="syntaxbox">var <em>animationsId</em> = <em>Animation</em>.id;
<em>Animation</em>.id = <em>newIdString</em>;
</pre>
<h3 id="Valor">Valor</h3>
<p>Un {{domxref("DOMString")}} que se puede usar para identificar la animación, o <code>null</code> si la animación no tiene <code>id</code>.</p>
<h2 id="Ejemplos">Ejemplos</h2>
<p>En el ejemplo <a href="http://codepen.io/rachelnabors/pen/eJyWzm?editors=0010">Follow the White Rabbit </a>, puedes asignar a <code>rabbitDownAnimation</code> un <code>id</code> de esta manera:</p>
<pre class="brush: js">rabbitDownAnimation.effect.<em>id</em> = "rabbitGo";
</pre>
<h2 id="Especificaciones">Especificaciones</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Web Animations', '#dom-animation-id', 'Animation.id' )}}</td>
<td>{{Spec2('Web Animations')}}</td>
<td>Editor's draft.</td>
</tr>
</tbody>
</table>
<h2 id="Compatibilidad_del_navegador">Compatibilidad del navegador</h2>
{{Compat("api.Animation.id")}}
<h2 id="Ver_también" style="line-height: 30px; font-size: 2.14285714285714rem;">Ver también</h2>
<ul>
<li>{{domxref("KeyframeEffect")}}</li>
<li><a href="/en-US/docs/Web/API/Web_Animations_API">Web Animations API</a></li>
<li>{{domxref("Animation")}}</li>
</ul>
|