aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/window/clearimmediate/index.html
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/zh-cn/web/api/window/clearimmediate/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/window/clearimmediate/index.html')
-rw-r--r--files/zh-cn/web/api/window/clearimmediate/index.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/window/clearimmediate/index.html b/files/zh-cn/web/api/window/clearimmediate/index.html
new file mode 100644
index 0000000000..84d84226e6
--- /dev/null
+++ b/files/zh-cn/web/api/window/clearimmediate/index.html
@@ -0,0 +1,72 @@
+---
+title: window.clearImmediate
+slug: Web/API/Window/clearImmediate
+translation_of: Web/API/Window/clearImmediate
+---
+<p>{{ ApiRef() }}</p>
+<h2 id="概述">概述</h2>
+<p>此方法用来清除 {{ domxref("window.setImmediate") }}.</p>
+<div class="note">
+ <strong>注意:</strong> 注意: 该方法最近刚刚被微软提出, 可能不会被w3c批准成为标准, 目前只有最新版Internet Explorer实现了该方法.</div>
+<h2 id="语法">语法</h2>
+<pre>window.clearImmediate(immediateID)
+</pre>
+<p>这里的immediateID是由{{ domxref("window.setImmediate") }}返回的.</p>
+<h2 id="例子">例子</h2>
+<pre>var immediateID = setImmediate(function () {
+  // Run some code
+}
+
+document.getElementById("button").addEventListener(function () {
+  clearImmediate(immediateID);
+}, false);
+</pre>
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+<p>{{ CompatibilityTable() }}</p>
+<div id="compat-desktop">
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatVersionUnknown() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<div id="compat-mobile">
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<h2 id="相关链接">相关链接</h2>
+<p>{{ domxref("window.setImmediate") }}</p>
+<p>{{ spec("https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html", "Specification: Efficient Script Yielding") }}</p>