mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-12-17 08:26:32 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
<div> <div class="blockIndicator obsolete obsoleteHeader"><p><strong><span class="icon-only-inline" title="This is an obsolete API and is no longer guaranteed to work."><i class="icon-trash"> </i></span> 已废弃</strong><br/>This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.</p></div></div>
|
||||
<p><code><strong>clear()</strong></code> 方法用于删除 <code>WeakSet</code> 对象的所有元素,但是已经不是 ECMAScript 的一部分了。</p>
|
||||
<h2 id="语法">语法</h2>
|
||||
<pre class="syntaxbox"><em>ws</em>.clear();</pre>
|
||||
<pre><code class="language-javascript"><em>ws</em>.clear();</code></pre>
|
||||
<h2 id="示例">示例</h2>
|
||||
<h3 id="使用_clear方法">使用 <code>clear方法</code></h3>
|
||||
<pre class="brush: js example-bad">var ws = new WeakSet();
|
||||
<pre><code class="language-js example-bad">var ws = new WeakSet();
|
||||
|
||||
ws.add(window);
|
||||
ws.has(window); // true
|
||||
@@ -13,7 +13,7 @@ ws.has(window); // true
|
||||
ws.clear();
|
||||
|
||||
ws.has(window); // false
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="规范">规范</h2>
|
||||
<p>没有规范或草案。该方法原本计划包括在 ECMAScript 6,但是在草案 revision 28 (October 14, 2014) 被抛弃了。浏览器原先的实现不久后也被移除了,它从来不是标准的一分子。</p>
|
||||
<h2 id="浏览器支持">浏览器支持</h2>
|
||||
|
||||
Reference in New Issue
Block a user