diff options
author | 现阳 <43157411+meakle@users.noreply.github.com> | 2021-11-29 23:17:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 23:17:12 +0800 |
commit | e5efa2c41e2219097552261737420c4864d82bd6 (patch) | |
tree | fa46ce9b02d2416ece310aa16d816eef8608549f /files/zh-cn/web/javascript/reference | |
parent | 81bcc7939165a0de4cf4aeab650c4c4e43b2de01 (diff) | |
download | translated-content-e5efa2c41e2219097552261737420c4864d82bd6.tar.gz translated-content-e5efa2c41e2219097552261737420c4864d82bd6.tar.bz2 translated-content-e5efa2c41e2219097552261737420c4864d82bd6.zip |
Patch new content Web/JavaScript/Reference/Global_Objects/Symbol, zh-CN (#3213)
url: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Symbol
description: instance methods and instance properties not render correct
Co-authored-by: fangjun <fangjun@tal.com>
Diffstat (limited to 'files/zh-cn/web/javascript/reference')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/symbol/index.html | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/symbol/index.html b/files/zh-cn/web/javascript/reference/global_objects/symbol/index.html index 9aec2c8777..3299f33a71 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/symbol/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/symbol/index.html @@ -124,13 +124,25 @@ typeof symObj; // "object"</pre> <p>所有 Symbols 继承自 {{jsxref("Symbol.prototype")}}.</p> -<h3 id="属性">属性</h3> +<h3 id="属性">实例属性</h3> -<p>{{page('zh-CN/Web/JavaScript/Reference/Global_Objects/Symbol/prototype','Properties')}}</p> +<dl> + <dt>{{jsxref("Symbol.prototype.description")}}</dt> + <dd>一个只读的字符串,意为对该 Symbol 对象的描述</dd> +</dl> -<h3 id="方法">方法</h3> +<h3 id="方法">实例方法</h3> -<p>{{page('zh-CN/Web/JavaScript/Reference/Global_Objects/Symbol/prototype','Methods')}}</p> +<dl> + <dt>{{jsxref("Symbol.prototype.toSource")}}</dt> + <dd>返回该 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>返回该 Symbol 对象。该方法重写了 {{jsxref("Symbol.prototype.valueOf")}} 方法</dd> + <dt>{{jsxref("Symbol.@@toPrimitive", "Symbol.prototype[@@toPrimitive]")}}</dt> + <dd>返回该 Symbol 对象。</dd> +</dl> <h2 id="Examples" name="Examples">示例</h2> |