From 012ee621791b6895e637f96e6523027951768f25 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:03:27 +0800 Subject: remove inline style for zh-CN --- .../global_objects/object/constructor/index.html | 2 +- .../global_objects/object/create/index.html | 8 ++++---- .../object/defineproperties/index.html | 2 +- .../global_objects/object/defineproperty/index.html | 2 +- .../global_objects/object/freeze/index.html | 2 +- .../object/getownpropertydescriptor/index.html | 6 +++--- .../object/getownpropertynames/index.html | 4 ++-- .../global_objects/object/getprototypeof/index.html | 20 +++----------------- .../global_objects/object/isextensible/index.html | 6 +++--- .../global_objects/object/isfrozen/index.html | 2 +- .../global_objects/object/issealed/index.html | 4 ++-- .../reference/global_objects/object/keys/index.html | 4 ++-- .../object/preventextensions/index.html | 2 +- .../reference/global_objects/object/seal/index.html | 2 +- .../global_objects/object/valueof/index.html | 6 ++---- 15 files changed, 28 insertions(+), 44 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/object') diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/constructor/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/constructor/index.html index b56ef4c920..ac1375763a 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/object/constructor/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/object/constructor/index.html @@ -196,7 +196,7 @@ Child.prototype.getOffsetByInitialPosition = function getOffsetByInitialPosition

总结:手动设置或更新构造函数可能会导致不同且有时令人困惑的后果。为了防止它,只需在每个特定情况下定义构造函数的角色。在大多数情况下,不使用构造函数,并且不需要重新分配构造函数。

-

规范

+

规范

diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/create/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/create/index.html index 255cd9ec0c..9bd6e7589c 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/object/create/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/object/create/index.html @@ -159,7 +159,7 @@ o2 = Object.create({}, { } }); -

Polyfill

+

Polyfill

这个 polyfill 涵盖了主要的应用场景,它创建一个已经选择了原型的新对象,但没有把第二个参数考虑在内。

@@ -182,7 +182,7 @@ o2 = Object.create({}, { }; } -

规范

+

规范

@@ -213,11 +213,11 @@ o2 = Object.create({}, {

{{Compat("javascript.builtins.Object.create")}}

-

相关链接

+

相关链接

diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/defineproperties/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/defineproperties/index.html index e4d9e9ef7a..9758d0af9b 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/object/defineproperties/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/object/defineproperties/index.html @@ -141,7 +141,7 @@ Object.defineProperties(obj, { return obj; } -

规范

+

规范

diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/defineproperty/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/defineproperty/index.html index b37662d5ab..74b6088e27 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/object/defineproperty/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/object/defineproperty/index.html @@ -172,7 +172,7 @@ Object.defineProperty(obj, "key", withValue("static"));

示例

-

如果你想了解如何使用 Object.defineProperty 方法和类二进制标记语法,可以看看这些额外示例

+

如果你想了解如何使用 Object.defineProperty 方法和类二进制标记语法,可以看看这些额外示例

创建属性

diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/freeze/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/freeze/index.html index 947a54007d..bd48ad319b 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/object/freeze/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/object/freeze/index.html @@ -161,7 +161,7 @@ TypeError: 1 is not an object // ES5 code

Object.seal()密封的对象可以改变它们现有的属性。使用Object.freeze() 冻结的对象中现有属性是不可变的。

-

规范

+

规范

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 7738e33117..b8432c64bd 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 @@ -27,7 +27,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDes
目标对象内属性名称
-

返回值

+

返回值

如果指定的属性存在于对象上,则返回其属性描述符对象(property descriptor),否则返回 {{jsxref("undefined")}}。

@@ -103,7 +103,7 @@ Object.getOwnPropertyDescriptor('foo', 0); // writable: false // } -

规范

+

规范

@@ -139,7 +139,7 @@ Object.getOwnPropertyDescriptor('foo', 0);
-
相关链接 
+
相关链接 
@@ -129,7 +115,7 @@ Object.getPrototypeOf('foo');
  • {{jsxref("Object.prototype.isPrototypeOf")}}
  • {{jsxref("Object.setPrototypeOf()")}}
  • {{jsxref("Object.prototype.__proto__")}}
  • -
  • John Resig's post on getPrototypeOf
  • +
  • John Resig's post on getPrototypeOf
  • {{jsxref("Reflect.getPrototypeOf()")}}
  • {{jsxref("AsyncFunction")}}
  • diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/isextensible/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/isextensible/index.html index 249ce52673..817dd1296a 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/object/isextensible/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/object/isextensible/index.html @@ -49,7 +49,7 @@ Object.isExtensible(frozen); // === false

     

    -

    注意

    +

    注意

    在 ES5 中,如果参数不是一个对象类型,将抛出一个 {{jsxref("TypeError")}} 异常。在 ES6 中, non-object 参数将被视为一个不可扩展的普通对象,因此会返回 false 。

    @@ -60,7 +60,7 @@ Object.isExtensible(1); // false (ES6 code) -

    规范

    +

    规范

    @@ -133,7 +133,7 @@ Object.isExtensible(1);
    -

    相关链接

    +

    相关链接