diff options
Diffstat (limited to 'files/zh-cn/conflicting/web/javascript/reference/global_objects/sharedarraybuffer/index.html')
-rw-r--r-- | files/zh-cn/conflicting/web/javascript/reference/global_objects/sharedarraybuffer/index.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/files/zh-cn/conflicting/web/javascript/reference/global_objects/sharedarraybuffer/index.html b/files/zh-cn/conflicting/web/javascript/reference/global_objects/sharedarraybuffer/index.html new file mode 100644 index 0000000000..ccb6f2df65 --- /dev/null +++ b/files/zh-cn/conflicting/web/javascript/reference/global_objects/sharedarraybuffer/index.html @@ -0,0 +1,63 @@ +--- +title: SharedArrayBuffer.prototype +slug: Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/prototype +tags: + - Prototype + - SharedArrayBuffer +translation_of: Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer +translation_of_original: Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/prototype +--- +<div>{{JSRef}}</div> + +<p><strong><code>SharedArrayBuffer.prototype</code></strong> 属性表示 {{jsxref("SharedArrayBuffer")}} 对象的原型。</p> + +<div>{{js_property_attributes(0,0,0)}}</div> + +<h2 id="描述">描述</h2> + +<p><code>SharedArrayBuffer</code>实例继承自<code>SharedArrayBuffer.prototype</code>。 与所有构造函数一样,您可以更改构造函数的原型对象以对所有<code>SharedArrayBuffer</code>实例进行更改。</p> + +<h2 id="属性">属性</h2> + +<dl> + <dt>SharedArrayBuffer.prototype.constructor</dt> + <dd>指定创建对象原型的函数。 初始值为标准的内置<code>SharedArrayBuffer</code>构造函数。</dd> + <dt>{{jsxref("SharedArrayBuffer.prototype.byteLength")}} {{readonlyInline}}</dt> + <dd>数组的大小(以字节为单位)。 这是在数组初始化时建立的,并且无法被更改。<strong> 只读</strong>。</dd> +</dl> + +<h2 id="方法">方法</h2> + +<dl> + <dt>{{jsxref("SharedArrayBuffer.slice", "SharedArrayBuffer.prototype.slice(begin, end)")}}</dt> + <dd>返回一个新的<code>SharedArrayBuffer</code>,其内容是此<code>SharedArrayBuffer</code>字节从<code>beigin</code>开始(包括<code>begin</code>)到<code>end</code>结束(不包括<code>end</code>)的副本。 如果<code>begin</code>或<code>end</code>为负,则它是指数组末尾的索引,而不是开头的索引。</dd> +</dl> + +<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-sharedarraybuffer.prototype', 'SharedArrayBuffer.prototype')}}</td> + <td>{{Spec2('ESDraft')}}</td> + <td>Initial definition in ES2017.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + + + +<p>{{Compat("javascript.builtins.SharedArrayBuffer.prototype")}}</p> + +<h2 id="相关链接">相关链接</h2> + +<ul> + <li>{{jsxref("SharedArrayBuffer")}}</li> +</ul> |