The ArrayBuffer.prototype
property represents the prototype for the ArrayBuffer
object.
ArrayBuffer.prototype
属性表示
ArrayBuffer
的原型对象。
ArrayBuffer.prototype 属性的属性特性: |
|
---|---|
writable | false |
enumerable | false |
configurable | false |
Description(描述)
ArrayBuffer
instances inherit from ArrayBuffer.prototype
. As with all constructors, you can change the constructor's prototype object to make changes to all ArrayBuffer
instances.
ArrayBuffer 实例继承自ArrayBuffer.prototype。因为所有的构造器继承自ArrayBuffer.prototype,所以你可以通过改变原型对象的构造器来改变所有的ArrayBuffer实例。
Properties(属性)
- ArrayBuffer.prototype.constructor
- Specifies the function that creates an object's prototype. The initial value is the standard built-in
ArrayBuffer
constructor. - 指定创建原型对象的函数。其初始值是ArrayBuffer内建的标准构造器。
ArrayBuffer.prototype.byteLength
只读- The size, in bytes, of the array. This is established when the array is constructed and cannot be changed. Read only.
- 字节大小。在ArrayBuffer实例被创建时产生的不可更改的只读属性。
Methods(方法)
ArrayBuffer.prototype.slice()
- Returns a new
ArrayBuffer
whose contents are a copy of thisArrayBuffer
's bytes frombegin
, inclusive, up toend
, exclusive. If eitherbegin
orend
is negative, it refers to an index from the end of the array, as opposed to from the beginning. - 返回一个新的子数组副本,从包含起始下标到结束下标减1。若起始下标为负则表示从0开始,若结束下标为负则表示到末尾。
Specifications(说明文档)
Specification(说明书) | Status(状态) | Comment(备注) |
---|---|---|
ECMAScript 2015 (6th Edition, ECMA-262) ArrayBuffer.prototype |
Standard | Initial definition. |
Browser compatibility(浏览器兼容性)
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 7.0 | 4.0 (2) | 10 | 11.6 | 5.1 |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 4.0 | (Yes) | 4.0 (2) | 10 | 11.6 | 4.2 |