From 01b0e12ba27b5069248fd09235e9a7143915ee30 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:02:49 +0800 Subject: remove `notranslate` class in zh-CN --- .../reference/global_objects/uint8clampedarray/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/uint8clampedarray') diff --git a/files/zh-cn/web/javascript/reference/global_objects/uint8clampedarray/index.html b/files/zh-cn/web/javascript/reference/global_objects/uint8clampedarray/index.html index 86028a8fb9..d4a018398c 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/uint8clampedarray/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/uint8clampedarray/index.html @@ -9,7 +9,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray

语法

-
new Uint8ClampedArray(length);
+
new Uint8ClampedArray(length);
 new Uint8ClampedArray(typedArray);
 new Uint8ClampedArray(object);
 new Uint8ClampedArray(buffer [, byteOffset [, length]]);
@@ -120,7 +120,7 @@ new Uint8ClampedArray(buffer [, byteOffset [, length]]);

创建一个 Uint8ClampedArray 的不同方式:

-
// From a length
+
// From a length
 var uintc8 = new Uint8ClampedArray(2);
 uintc8[0] = 42;
 uintc8[1] = 1337;
@@ -265,11 +265,11 @@ var uintc8 = new Uint8ClampedArray(iterable);
 
 

从 ECMAScript 2015 开始, Uint8ClampedArray 构造函数需要用一个 {{jsxref("Operators/new", "new")}} 操作符来构建。从现在开始,不使用 new 来调用一个 Uint8ClampedArray 构造函数将会抛出一个 {{jsxref("TypeError")}}。

-
var dv = Uint8ClampedArray([1, 2, 3]);
+
var dv = Uint8ClampedArray([1, 2, 3]);
 // TypeError: calling a builtin Uint8ClampedArray constructor
 // without new is forbidden
-
var dv = new Uint8ClampedArray([1, 2, 3]);
+
var dv = new Uint8ClampedArray([1, 2, 3]);

参见

-- cgit v1.2.3-54-g00ecf