aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/window/cancelanimationframe
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/window/cancelanimationframe
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/window/cancelanimationframe')
-rw-r--r--files/ja/web/api/window/cancelanimationframe/index.html122
1 files changed, 122 insertions, 0 deletions
diff --git a/files/ja/web/api/window/cancelanimationframe/index.html b/files/ja/web/api/window/cancelanimationframe/index.html
new file mode 100644
index 0000000000..98bea1681c
--- /dev/null
+++ b/files/ja/web/api/window/cancelanimationframe/index.html
@@ -0,0 +1,122 @@
+---
+title: window.cancelAnimationFrame
+slug: Web/API/Window/cancelAnimationFrame
+tags:
+ - API
+ - DOM
+ - Method
+translation_of: Web/API/Window/cancelAnimationFrame
+---
+<div>{{APIRef}}</div>
+
+<h2 id="Summary" name="Summary">概要</h2>
+
+<p>{{domxref("window.requestAnimationFrame()")}} の呼び出しによりスケジュールされたフレームアニメーションのリクエストをキャンセルします。</p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox">window.cancelAnimationFrame(<em>requestID</em>);
+</pre>
+
+<h3 id="Parameters" name="Parameters">引数</h3>
+
+<dl>
+ <dt><code>requestID</code></dt>
+ <dd>コールバックがリクエストした {{domxref("window.requestAnimationFrame()")}} の呼び出しにより返された ID 値。</dd>
+</dl>
+
+<h2 id="Examples" name="Examples">例</h2>
+
+<pre class="brush: js">var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
+ window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
+
+var cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
+
+var start = window.mozAnimationStartTime; // Firefox のみでサポート。他のブラウザーでは代わりに Date.now() などを使用してください。
+
+var myReq;
+
+function step(timestamp) {
+ var progress = timestamp - start;
+ d.style.left = Math.min(progress / 10, 200) + 'px';
+ if (progress &lt; 2000) {
+ myReq = requestAnimationFrame(step);
+ }
+}
+myReq = requestAnimationFrame(step);
+
+cancelAnimationFrame(myReq);
+</pre>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの実装状況</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>機能</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>基本サポート</td>
+ <td>21.0 {{property_prefix("webkit")}}<br>
+ 24.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop("11.0")}} {{property_prefix("moz")}}<br>
+ 23.0</td>
+ <td>10</td>
+ <td>15.0</td>
+ <td>6.0 {{property_prefix("webkit")}}<br>
+ 6.1</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>機能</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>基本サポート</td>
+ <td>4.4</td>
+ <td>33</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile("11.0")}} {{property_prefix("moz")}}<br>
+ 23.0</td>
+ <td>10</td>
+ <td>33</td>
+ <td>7.1</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Specification" name="Specification">仕様</h2>
+
+<ul>
+ <li>{{spec("http://www.w3.org/TR/animation-timing/#cancelAnimationFrame", "Timing control for script-based animations: cancelAnimationFrame", "WD")}}</li>
+</ul>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li>{{domxref("window.mozAnimationStartTime")}}</li>
+ <li>{{domxref("window.requestAnimationFrame()")}}</li>
+</ul>