aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/javascript/reference/global_objects/symbol/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/conflicting/web/javascript/reference/global_objects/symbol/index.html')
-rw-r--r--files/zh-cn/conflicting/web/javascript/reference/global_objects/symbol/index.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/files/zh-cn/conflicting/web/javascript/reference/global_objects/symbol/index.html b/files/zh-cn/conflicting/web/javascript/reference/global_objects/symbol/index.html
new file mode 100644
index 0000000000..f00b37a223
--- /dev/null
+++ b/files/zh-cn/conflicting/web/javascript/reference/global_objects/symbol/index.html
@@ -0,0 +1,67 @@
+---
+title: Symbol.prototype
+slug: Web/JavaScript/Reference/Global_Objects/Symbol/prototype
+translation_of: Web/JavaScript/Reference/Global_Objects/Symbol
+translation_of_original: Web/JavaScript/Reference/Global_Objects/Symbol/prototype
+---
+<div>{{JSRef}}</div>
+
+<p><code><strong>Symbol</strong></code><strong><code>.prototype</code></strong> 表示 {{jsxref("Symbol")}} 构造函数的原型。.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/symbol-prototype.html")}}</div>
+
+<h2 id="Description">Description</h2>
+
+<p>{{jsxref("Symbol")}} 继承自 {{jsxref("Symbol.prototype")}}. 你可以使用构造函数的原型对象来给所有Symbol实例添加属性或者方法。</p>
+
+<p>{{js_property_attributes(0,0,0)}}</p>
+
+<h2 id="Properties">Properties</h2>
+
+<dl>
+ <dt><code>Symbol.prototype.constructor</code></dt>
+ <dd>返回创建实例原型的函数. 默认为 {{jsxref("Symbol")}} 函数。</dd>
+ <dt>{{jsxref("Symbol.prototype.description")}}</dt>
+ <dd>一个包含symbol描述的只读字符串。</dd>
+</dl>
+
+<h2 id="Methods">Methods</h2>
+
+<dl>
+ <dt>{{jsxref("Symbol.prototype.toSource()")}} {{Non-standard_inline}}</dt>
+ <dd>返回包含{{jsxref("Global_Objects/Symbol", "Symbol")}} 对象源码的字符串。覆盖{{jsxref("Object.prototype.toSource()")}} 方法。</dd>
+ <dt>{{jsxref("Symbol.prototype.toString()")}}</dt>
+ <dd>返回包含Symbol描述符的字符串。 覆盖{{jsxref("Object.prototype.toString()")}} 方法。</dd>
+ <dt>{{jsxref("Symbol.prototype.valueOf()")}}</dt>
+ <dd>返回 {{jsxref("Symbol")}} 对象的初始值.。覆盖 {{jsxref("Object.prototype.valueOf()")}} 方法。</dd>
+ <dt>{{jsxref("Symbol.prototype.@@toPrimitive()", "Symbol.prototype[@@toPrimitive]")}}</dt>
+ <dd> 返回{{jsxref("Symbol")}}对象的初始值。</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-symbol.prototype', 'Symbol.prototype')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-symbol.prototype', 'Symbol.prototype')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容">浏览器兼容</h2>
+
+<p>{{Compat("javascript.builtins.Symbol.prototype")}}</p>
+
+<div id="compat-mobile"></div>