aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/javascript/reference/global_objects/weakset/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/conflicting/web/javascript/reference/global_objects/weakset/index.html')
-rw-r--r--files/zh-cn/conflicting/web/javascript/reference/global_objects/weakset/index.html116
1 files changed, 116 insertions, 0 deletions
diff --git a/files/zh-cn/conflicting/web/javascript/reference/global_objects/weakset/index.html b/files/zh-cn/conflicting/web/javascript/reference/global_objects/weakset/index.html
new file mode 100644
index 0000000000..d06fca34dc
--- /dev/null
+++ b/files/zh-cn/conflicting/web/javascript/reference/global_objects/weakset/index.html
@@ -0,0 +1,116 @@
+---
+title: WeakSet.prototype
+slug: conflicting/Web/JavaScript/Reference/Global_Objects/WeakSet
+translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet
+translation_of_original: Web/JavaScript/Reference/Global_Objects/WeakSet/prototype
+original_slug: Web/JavaScript/Reference/Global_Objects/WeakSet/prototype
+---
+<div>{{JSRef("Global_Objects", "WeakSet")}}</div>
+
+<h2 id="Summary" name="Summary">Summary</h2>
+
+<p>The <code><strong>WeakSet</strong></code><strong><code>.prototype</code></strong> property represents the prototype for the {{jsxref("WeakSet")}} constructor.</p>
+
+<div>{{js_property_attributes(0,0,0)}}</div>
+
+<h2 id="Description" name="Description">Description</h2>
+
+<p>{{jsxref("WeakSet")}} instances inherit from {{jsxref("WeakSet.prototype")}}. You can use the constructor's prototype object to add properties or methods to all <code>WeakSet</code> instances.</p>
+
+<h2 id="Properties">Properties</h2>
+
+<dl>
+ <dt><code>WeakSet.prototype.constructor</code></dt>
+ <dd>返回构造函数即 {{jsxref("WeakSet")}} 本身.</dd>
+</dl>
+
+<h2 id="Methods">Methods</h2>
+
+<dl>
+ <dt>{{jsxref("WeakSet.add", "WeakSet.prototype.add(value)")}}</dt>
+ <dd> 在<span style="line-height: 1.5;">该 </span><code style="font-size: 14px;">WeakSet</code><span style="line-height: 1.5;"> 对象中添加一个新元素 <code>value</code>.</span></dd>
+ <dt>{{jsxref("WeakSet.delete", "WeakSet.prototype.delete(value)")}}</dt>
+ <dd>从<span style="line-height: 1.5;">该 </span><code style="font-size: 14px;">WeakSet</code><span style="line-height: 1.5;"> 对象中删除</span><span style="line-height: 1.5;"> </span><code style="font-size: 14px;">value </code><span style="line-height: 1.5;">这个元素, 之后 </span><code style="font-size: 14px;">WeakSet.prototype.has(value)</code><span style="line-height: 1.5;"> 方法便会返回 </span><code style="font-size: 14px;">false</code><span style="line-height: 1.5;">.</span></dd>
+ <dt>{{jsxref("WeakSet.has", "WeakSet.prototype.has(value)")}}</dt>
+ <dd>返回一个布尔值,  表示给定的值 <code>value</code> 是否存在于这个 <code>WeakSet</code> 中.</dd>
+</dl>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-weakset.prototype', 'WeakSet.prototype')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</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>{{ CompatVersionUnknown() }}</td>
+ <td>{{ CompatNo() }} {{bug(792439)}}</td>
+ <td>{{ CompatNo() }}</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() }} {{bug(792439)}}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatNo() }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h3 id="Chrome-specific_notes">Chrome-specific notes</h3>
+
+<ul>
+ <li>This feature is available behind a preference. In <code style="font-size: 14px;">chrome://flags</code>, activate the entry “Enable Experimental JavaScript”.</li>
+</ul>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{jsxref("Set.prototype")}}</li>
+ <li>{{jsxref("WeakMap.prototype")}}</li>
+</ul>