diff options
Diffstat (limited to 'files/ja/web/api/document/transitionrun_event/index.html')
-rw-r--r-- | files/ja/web/api/document/transitionrun_event/index.html | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/files/ja/web/api/document/transitionrun_event/index.html b/files/ja/web/api/document/transitionrun_event/index.html new file mode 100644 index 0000000000..0889ea8f37 --- /dev/null +++ b/files/ja/web/api/document/transitionrun_event/index.html @@ -0,0 +1,93 @@ +--- +title: 'Document: transitionrun イベント' +slug: Web/API/Document/transitionrun_event +tags: + - Document + - Event + - Reference + - TransitionEvent + - Web + - transitionrun + - イベント + - ウェブ + - トランジション +translation_of: Web/API/Document/transitionrun_event +--- +<div>{{APIRef}}{{SeeCompatTable}}</div> + +<p><strong><code>transitionrun</code></strong> イベントは、 <a href="/ja/docs/CSS/Using_CSS_transitions">CSS トランジション</a>が最初に生成されたとき、すなわち {{cssxref("transition-delay")}} が始まる前に発生します。</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">バブリング</th> + <td>あり</td> + </tr> + <tr> + <th scope="row">キャンセル</th> + <td>不可</td> + </tr> + <tr> + <th scope="row">インターフェイス</th> + <td>{{domxref("TransitionEvent")}}</td> + </tr> + <tr> + <th scope="row">イベントハンドラープロパティ</th> + <td>{{domxref("GlobalEventHandlers/ontransitionrun", "ontransitionrun")}}</td> + </tr> + </tbody> +</table> + +<p>このイベントの本来の対象は、トランジションが適用された {{domxref("Element")}} です。このイベントを {{domxref("Document")}} インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントについて完全な詳細は、 <a href="/ja/docs/Web/API/HTMLElement/transitionrun_event">HTMLElement: transitionrun イベント</a>を参照してください。</p> + +<h2 id="Examples" name="Examples">例</h2> + +<p>次のコードは <code>transitionrun</code> イベントにリスナーを追加します。</p> + +<pre class="brush: js">document.addEventListener('transitionrun', () => { + console.log('Transition is running but hasn't necessarily started transitioning yet'); +});</pre> + +<p>同じですが、 {{domxref("GlobalEventHandlers/ontransitionrun", "ontransitionrun")}} を <code>addEventListener()</code> の代わりに使用すると次のようになります。</p> + +<pre class="brush: js">document.ontransitionrun = () => { + console.log('Transition started running'); +};</pre> + +<p><a href="/ja/docs/Web/API/HTMLElement/transitionrun_event#Live_example">このイベントのライブデモを参照してください。</a></p> + +<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 Transitions', '#transitionrun', 'transitionrun')}}</td> + <td>{{Spec2('CSS3 Transitions')}}</td> + <td>初回定義</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2> + +<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div> + +<p>{{Compat("api.Document.transitionrun_event")}}</p> + +<h2 id="See_also" name="See_also">関連情報</h2> + +<ul> + <li>{{domxref("GlobalEventHandlers.ontransitionrun")}} イベントハンドラー</li> + <li>{{domxref("TransitionEvent")}} インターフェイス</li> + <li>CSS プロパティ: {{cssxref("transition")}}, {{cssxref("transition-delay")}}, {{cssxref("transition-duration")}}, {{cssxref("transition-property")}}, {{cssxref("transition-timing-function")}}</li> + <li>関連イベント: {{domxref("Document/transitionend_event", "transitionend")}}, {{domxref("Document/transitionstart_event", "transitionstart")}}, {{domxref("Document/transitioncancel_event", "transitioncancel")}}</li> + <li>{{domxref("HTMLElement")}} を対象としたこのイベント: {{domxref("HTMLElement/transitionrun_event", "transitionrun")}}</li> + <li>{{domxref("Window")}} を対象としたこのイベント: {{domxref("Window/transitionstart_run", "transitionrun")}}</li> +</ul> |