sharedArrayBuffer.byteLength
sharedArrayBuffer.byteLength
byteLength
访问器属性表示以字节为单位的一个SharedArrayBuffer
的长度。
语法
sab.byteLength
描述
byteLength
只可以被读取,不可以被赋值。这个变量会在array创建的时候生成,且无法更改
示例
var sab = new SharedArrayBuffer(1024
sab.byteLength; // 1024
规范
Specification | Status | Comment |
---|---|---|
ECMAScript Latest Draft (ECMA-262)The definition of 'SharedArrayBuffer.prototype.byteLength' in that specification. | Draft | Initial definition in ES2017. |
浏览器兼容性
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | No support | No support | 55 (55) 1 | No support | No support | No support |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | No support | No support | 55.0 (55) 1 | No support | No support | No support |