aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/animationevent/index.html
blob: 4db188602d8a32e966289ea656718d332d3d46b8 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
title: AnimationEvent
slug: Web/API/AnimationEvent
tags:
  - API
  - CSS アニメーション
  - Experimental
  - Interface
  - Reference
  - Web Animations
  - インターフェイス
translation_of: Web/API/AnimationEvent
---
<div>{{SeeCompatTable}}{{APIRef("Web Animations API")}}</div>

<p><strong><code>AnimationEvent</code></strong> インターフェイスは、<a href="/ja/docs/Web/CSS/CSS_Animations/Using_CSS_animations">アニメーション</a>に関する情報を提供するイベントを表します。</p>

<p>{{InheritanceDiagram}}</p>

<h2 id="Constructor" name="Constructor">コンストラクター</h2>

<dl>
 <dt>{{domxref("AnimationEvent.AnimationEvent", "AnimationEvent()")}}</dt>
 <dd>指定された引数で <code>AnimationEvent</code> イベントを生成します。</dd>
</dl>

<h2 id="Properties" name="Properties">プロパティ</h2>

<p><em>親の {{domxref("Event")}} から継承されるプロパティもあります</em></p>

<dl>
 <dt>{{domxref("AnimationEvent.animationName")}} {{readonlyInline}}</dt>
 <dd>{{domxref("DOMString")}} で、この変化に関連付けられた {{cssxref("animation-name")}} CSS プロパティの値を含みます。</dd>
 <dt>{{domxref("AnimationEvent.elapsedTime")}} {{readonlyInline}}</dt>
 <dd><code>float</code> 値で、アニメーションが実行された時間の長さを秒単位で表し、イベントが発生したときは、アニメーションが停止していた時間は除外されます。 <code>animationstart</code> イベントでは、 <code>elapsedTime</code> は、ふつう <code>0.0</code> となりますが、 {{cssxref("animation-delay")}} が負の値であった場合は例外で、この場合はイベントは <code>elapsedTime</code><code>(-1 * <var>delay</var>)</code> が入った状態でイベントが発生します。</dd>
 <dt>{{domxref("AnimationEvent.pseudoElement")}} {{readonlyInline}}</dt>
 <dd>{{domxref("DOMString")}} で、 <code>'::'</code> で始まり、アニメーションが実行される <a href="/ja/docs/Web/CSS/Pseudo-elements">疑似要素</a> の名前が入ります。このアニメーションが疑似要素ではなく要素で実行されている場合は、空文字列 <code>''</code> になります。</dd>
</dl>

<h2 id="Methods" name="Methods">メソッド</h2>

<p><em>親の {{domxref("Event")}} から継承されるメソッドもあります</em></p>

<dl>
 <dt>{{domxref("AnimationEvent.initAnimationEvent()")}} {{non-standard_inline}}{{deprecated_inline}}</dt>
 <dd>非推奨の {{domxref("Document.createEvent()", "Document.createEvent(\"AnimationEvent\")")}} メソッドを使用して作成された <code>AnimationEvent</code> を初期化します。</dd>
</dl>

<h2 id="Specifications" name="Specifications">仕様書</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">状態</th>
   <th scope="col">備考</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("CSS3 Animations", "#interface-animationevent", "AnimationEvent")}}</td>
   <td>{{Spec2("CSS3 Animations")}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>

<p>{{Compat("api.AnimationEvent")}}</p>

<h2 id="See_also" name="See_also">関連情報</h2>

<ul>
 <li><a href="/ja/docs/Web/CSS/CSS_Animations/Using_CSS_animations">CSS アニメーションの使用</a></li>
 <li>アニメーションに関する CSS プロパティと @-規則: {{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>