From 6e9fe98036090a37cc6247b873845505e5b512fb Mon Sep 17 00:00:00 2001 From: Tanner Dolby Date: Tue, 22 Feb 2022 01:49:36 -0800 Subject: Removes empty
or

elements from pages (#3093) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Co-authored-by: Masahiro FUJIMOTO --- .../reference/global_objects/object/getownpropertydescriptor/index.html | 2 +- .../web/javascript/reference/global_objects/object/proto/index.html | 2 +- .../web/javascript/reference/global_objects/object/seal/index.html | 2 +- .../reference/global_objects/object/setprototypeof/index.html | 2 +- .../web/javascript/reference/global_objects/object/tosource/index.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/object') 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);

{{Compat("javascript.builtins.Object.getOwnPropertyDescriptor")}}
-
+
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
{{jsxref("Object.prototype")}} 的 __proto__  属性是一个访问器属性(一个getter函数和一个setter函数), 暴露了通过它访问的对象的内部[[Prototype]] (一个对象或 {{jsxref("Global_Objects/null", "null")}})。
-
+

使用__proto__是有争议的,也不鼓励使用它。因为它从来没有被包括在EcmaScript语言规范中,但是现代浏览器都实现了它。__proto__属性已在ECMAScript 6语言规范中标准化,用于确保Web浏览器的兼容性,因此它未来将被支持。它已被不推荐使用, 现在更推荐使用{{jsxref("Object.getPrototypeOf")}}/{{jsxref("Reflect.getPrototypeOf")}} 和{{jsxref("Object.setPrototypeOf")}}/{{jsxref("Reflect.setPrototypeOf")}}(尽管如此,设置对象的[[Prototype]]是一个缓慢的操作,如果性能是一个问题,应该避免)。

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
Object.seal()方法封闭一个对象,阻止添加新属性并将所有现有属性标记为不可配置。当前属性的值只要原来是可写的就可以改变。
-
+
{{EmbedInteractiveExample("pages/js/object-seal.html")}}
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
Object.setPrototypeOf() 方法设置一个指定的对象的原型 ( 即, 内部[[Prototype]]属性)到另一个对象或  {{jsxref("null")}}。
-
+

警告:由于现代 JavaScript 引擎优化属性访问所带来的特性的关系,更改对象的 [[Prototype]]各个浏览器和 JavaScript 引擎上都是一个很慢的操作。其在更改继承的性能上的影响是微妙而又广泛的,这不仅仅限于 obj.__proto__ = ... 语句上的时间花费,而且可能会延伸到任何代码,那些可以访问任何[[Prototype]]已被更改的对象的代码。如果你关心性能,你应该避免设置一个对象的 [[Prototype]]。相反,你应该使用 {{jsxref("Object.create()")}}来创建带有你想要的[[Prototype]]的新对象。

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");
  • {{jsxref("Object.prototype.toString()")}}
  • -

    + -- cgit v1.2.3-54-g00ecf