aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/sharedarraybuffer/bytelength
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/javascript/reference/global_objects/sharedarraybuffer/bytelength
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/sharedarraybuffer/bytelength')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/sharedarraybuffer/bytelength/index.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/sharedarraybuffer/bytelength/index.html b/files/zh-cn/web/javascript/reference/global_objects/sharedarraybuffer/bytelength/index.html
new file mode 100644
index 0000000000..a558623014
--- /dev/null
+++ b/files/zh-cn/web/javascript/reference/global_objects/sharedarraybuffer/bytelength/index.html
@@ -0,0 +1,53 @@
+---
+title: SharedArrayBuffer.prototype.byteLength
+slug: Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/byteLength
+tags:
+ - SharedArrayBuffer
+translation_of: Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/byteLength
+---
+<div>{{JSRef}}</div>
+
+<p> <code><strong>byteLength</strong></code> 访问器属性表示以字节为单位的一个{{jsxref("SharedArrayBuffer")}}的长度。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><var>sab</var>.byteLength</pre>
+
+<h2 id="描述">描述</h2>
+
+<p><code>byteLength</code>属性是一个访问者属性,其set访问者函数为 <code>undefined</code>,这意味着您只能读取此属性。 该值在构造共享数组时建立,并且无法更改。</p>
+
+<h2 id="例子">例子</h2>
+
+<pre class="brush:js">var sab = new SharedArrayBuffer(1024);
+sab.byteLength; // 1024
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-get-sharedarraybuffer.prototype.bytelength', 'SharedArrayBuffer.prototype.byteLength')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td>Initial definition in ES2017.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("javascript.builtins.SharedArrayBuffer.byteLength")}}</p>
+
+<h2 id="相关链接">相关链接</h2>
+
+<ul>
+ <li>{{jsxref("SharedArrayBuffer")}}</li>
+</ul>