首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

arrayBuffer.byteLength

byteLength访问器属性表示一个ArrayBuffer对象的字节长度。

语法

代码语言:javascript
复制
arraybuffer.byteLength

描述

byteLength属性是一个访问器属性,它的set访问器函数是undefined,这意味着你只能读这个属性。 该值在数组创建时确定,并且不可变更。如果这个ArrayBuffer被移除,则此属性返回0。

示例

代码语言:javascript
复制
var buffer = new ArrayBuffer(8);
buffer.byteLength; // 8

规范

Specification

Status

Comment

Typed Array Specification

Obsolete

Superseded by ECMAScript 2015.

ECMAScript 2015 (6th Edition, ECMA-262)The definition of 'ArrayBuffer.prototype.byteLength' in that specification.

Standard

Initial definition in an ECMA standard.

ECMAScript Latest Draft (ECMA-262)The definition of 'ArrayBuffer.prototype.byteLength' in that specification.

Draft

?

浏览器兼容性

Feature

Chrome

Edge

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

7.0

(Yes)

4.0 (2)

10

11.6

5.1

Feature

Android

Chrome for Android

Edge

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

4.0

(Yes)

(Yes)

4.0 (2)

10

11.6

4.2

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com