Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

ArrayBuffer.prototype.byteLength

这篇文章需要技术复核。如何帮忙。

这篇文章需要文法复核。如何帮忙。

这篇翻译不完整。请帮忙从英语翻译这篇文章

The byteLength accessor property represents the length of an ArrayBuffer in bytes.

byteLength访问器表示ArrayBuffer 实例对象的字节长度。

Syntax(语法)

arraybuffer.byteLength

Description(描述)

The byteLength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this ArrayBuffer has been detached.

byteLength属性是在实例创建时建立的不可更改的只读属性。如果实例被销毁(即在堆中的空间被释放)则此属性返回0。

 

Examples(示例)

var buffer = new ArrayBuffer(8);
buffer.byteLength; // 8

Specifications(说明书文档)

Specification(说明书) Status(状态) Comment(备注)
Typed Array Specification Obsolete Superseded by ECMAScript 6.
ECMAScript 2015 (6th Edition, ECMA-262)
ArrayBuffer.prototype.byteLength
Standard Initial definition in an ECMA standard.

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

See also(另见参考文档)

文档标签和贡献者

 此页面的贡献者: fred4444source
 最后编辑者: fred4444source,