aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/object
diff options
context:
space:
mode:
authorTanner Dolby <tannercdolby@gmail.com>2022-02-22 01:49:36 -0800
committerGitHub <noreply@github.com>2022-02-22 17:49:36 +0800
commit6e9fe98036090a37cc6247b873845505e5b512fb (patch)
tree5fc00117ddfd9f448eb9e8011b5bd7f6d8000e8d /files/zh-cn/web/javascript/reference/global_objects/object
parent70c3e11f3335e7701325f125fd712c84d6c1f9bf (diff)
downloadtranslated-content-6e9fe98036090a37cc6247b873845505e5b512fb.tar.gz
translated-content-6e9fe98036090a37cc6247b873845505e5b512fb.tar.bz2
translated-content-6e9fe98036090a37cc6247b873845505e5b512fb.zip
Removes empty <div> or <p> elements from pages (#3093)
* Removes all empty paragraph elements * Removes all empty div elements * Preserve empty div in code snippet * Preserve empty elements inside code snippets * Remove fr files which were converted into markdown * Web/CSS/transform-function/scaleX()/index.html The file is already renamed to index.md。 * remove not needed file * Resolve remaining conflict Co-authored-by: julieng <julien.gattelier@gmail.com> Co-authored-by: Masahiro FUJIMOTO <mfujimot@gmail.com>
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/object')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/object/getownpropertydescriptor/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/object/proto/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/object/setprototypeof/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/object/tosource/index.html2
5 files changed, 5 insertions, 5 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertydescriptor/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertydescriptor/index.html
index c9854cdd57..23450e809f 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertydescriptor/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertydescriptor/index.html
@@ -135,7 +135,7 @@ Object.getOwnPropertyDescriptor('foo', 0);
<div>{{Compat("javascript.builtins.Object.getOwnPropertyDescriptor")}}</div>
-<div></div>
+
<div></div>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/proto/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/proto/index.html
index 90f9790a0b..5a24536147 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/object/proto/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/object/proto/index.html
@@ -22,7 +22,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/proto
<div>{{jsxref("Object.prototype")}} 的 <code>__proto__</code>  属性是一个访问器属性(一个getter函数和一个setter函数), 暴露了通过它访问的对象的内部<code>[[Prototype]]</code> (一个对象或 {{jsxref("Global_Objects/null", "null")}})。</div>
-<div></div>
+
<p>使用<code>__proto__</code>是有争议的,也不鼓励使用它。因为它从来没有被包括在EcmaScript语言规范中,但是现代浏览器都实现了它。<code>__proto__</code>属性已在ECMAScript 6语言规范中标准化,用于确保Web浏览器的兼容性,因此它未来将被支持。它已被不推荐使用, 现在更推荐使用{{jsxref("Object.getPrototypeOf")}}/{{jsxref("Reflect.getPrototypeOf")}} 和{{jsxref("Object.setPrototypeOf")}}/{{jsxref("Reflect.setPrototypeOf")}}(尽管如此,设置对象的[[Prototype]]是一个缓慢的操作,如果性能是一个问题,应该避免)。</p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html
index ad57d66c17..76308b311d 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html
@@ -12,7 +12,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/seal
<div><code><strong>Object.seal()</strong></code>方法封闭一个对象,阻止添加新属性并将所有现有属性标记为不可配置。当前属性的值只要原来是可写的就可以改变。</div>
-<div></div>
+
<div>{{EmbedInteractiveExample("pages/js/object-seal.html")}}</div>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/setprototypeof/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/setprototypeof/index.html
index a73a8c612c..6bc6b42924 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/object/setprototypeof/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/object/setprototypeof/index.html
@@ -18,7 +18,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf
<div><strong>Object.setPrototypeOf() </strong>方法设置一个指定的对象的原型 ( 即, 内部[[Prototype]]属性)到另一个对象或  {{jsxref("null")}}。</div>
-<div></div>
+
<div class="warning">
<p><strong>警告:</strong>由于现代 JavaScript 引擎优化属性访问所带来的特性的关系,更改对象的 <code>[[Prototype]]</code>在<em><strong>各个</strong></em>浏览器和 JavaScript 引擎上都是一个很慢的操作。其在更改继承的性能上的影响是微妙而又广泛的,这不仅仅限于 <code>obj.__proto__ = ...</code> 语句上的时间花费,而且可能会延伸到<em><strong>任何</strong></em>代码,那些可以访问<em><strong>任何</strong></em><code>[[Prototype]]</code>已被更改的对象的代码。如果你关心性能,你应该避免设置一个对象的 <code>[[Prototype]]</code>。相反,你应该使用 {{jsxref("Object.create()")}}来创建带有你想要的<code>[[Prototype]]</code>的新对象。</p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/tosource/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/tosource/index.html
index 5713289596..88affb3521 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/object/tosource/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/object/tosource/index.html
@@ -123,4 +123,4 @@ theDog = new Dog("Gabby", "Lab", "chocolate", "girl");</pre>
<li>{{jsxref("Object.prototype.toString()")}}</li>
</ul>
-<p></p>
+