mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-02-27 17:44:35 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
<p><img alt="WeakMap(no clear() any more).png" src="https://mdn.mozillademos.org/files/15608/WeakMap(no%20clear()%20any%20more).png" style="height: 490px; width: 735px;"/></p>
|
||||
</div>
|
||||
<h2 id="语法">语法</h2>
|
||||
<pre class="syntaxbox"><em>wm</em>.clear();</pre>
|
||||
<pre><code class="language-javascript"><em>wm</em>.clear();</code></pre>
|
||||
<h2 id="示例">示例</h2>
|
||||
<h3 id="使用_clear_方法">使用 <code>clear</code> 方法</h3>
|
||||
<pre class="brush: js;highlight:[10] example-bad">var wm = new WeakMap();
|
||||
<pre><code class="language-js;highlight:[10] example-bad">var wm = new WeakMap();
|
||||
var obj = {};
|
||||
|
||||
wm.set(obj, "foo");
|
||||
@@ -22,7 +22,7 @@ wm.clear();
|
||||
|
||||
wm.has(obj) // false
|
||||
wm.has(window) // false
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="规范">规范</h2>
|
||||
<p>当前版本或者起草中没有这个方法,这个方法在版本 28(2014 年 10 月 14) 之前是 ECMAScript 6 起草规范的一部分,但是在起草之后的版本中被移除了。它不在是最终标准的一部分了 。</p>
|
||||
<h2 id="浏览器兼容性">浏览器兼容性</h2>
|
||||
|
||||
Reference in New Issue
Block a user