aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/javascript/reference/global_objects/arraybuffer/index.html
blob: 494ec5dcf7c6680c35027e9a481289e3e8673965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: ArrayBuffer.prototype
slug: conflicting/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
tags:
  - ArrayBuffer
translation_of: Web/JavaScript/Reference/Global_Objects/ArrayBuffer
translation_of_original: Web/JavaScript/Reference/Global_Objects/ArrayBuffer/prototype
original_slug: Web/JavaScript/Reference/Global_Objects/ArrayBuffer/prototype
---
<div>{{JSRef}}</div>

<p><strong><code>ArrayBuffer.prototype</code></strong><code>属性表示</code>{{jsxref("ArrayBuffer")}}对象的原型。</p>

<div>{{js_property_attributes(0,0,0)}}</div>

<div> </div>

<h2 id="描述">描述</h2>

<p>ArrayBuffer 实例继承自<code>ArrayBuffer.prototype。对所有的构造函数来说,你可以通过改变构造函数的原型对象来改变所有的ArrayBuffer实例。</code></p>

<h2 id="属性">属性</h2>

<dl>
 <dt>ArrayBuffer.prototype.constructor</dt>
 <dd>指定函数,它创建一个对象的原型。其初始值是标准ArrayBuffer内置构造函数。</dd>
 <dt>{{jsxref("ArrayBuffer.prototype.byteLength")}} {{readonlyInline}}</dt>
 <dd>数组的字节大小。在数组创建时确定,并且不可变更。<strong>只读</strong></dd>
</dl>

<h2 id="方法">方法</h2>

<dl>
 <dt>{{jsxref("ArrayBuffer.prototype.slice()")}}</dt>
 <dd>返回一个新的 <code>ArrayBuffer</code> ,它的内容是这个 <code>ArrayBuffer</code> 的字节副本,从begin(包括),到end(不包括)。如果begin或end是负数,则指的是从数组末尾开始的索引,而不是从头开始。</dd>
</dl>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">规范</th>
   <th scope="col">状态</th>
   <th scope="col">备注</th>
  </tr>
  <tr>
   <td>{{SpecName('ES6', '#sec-arraybuffer.prototype', 'ArrayBuffer.prototype')}}</td>
   <td>{{Spec2('ES6')}}</td>
   <td>初始定义</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>



<p>{{Compat("javascript.builtins.ArrayBuffer.prototype")}}</p>

<h2 id="相关链接">相关链接</h2>

<ul>
 <li>{{jsxref("ArrayBuffer")}}</li>
</ul>