JS SharedArrayBuffer byteLength
byteLength
访问器属性表示以字节为单位的一个SharedArrayBuffer
的长度。
Syntax
sab.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 shared array is constructed and cannot be changed.
Examples
var sab = new SharedArrayBuffer(1024);
sab.byteLength; // 1024
Specifications
Specification | Status | Comment |
---|---|---|
ECMAScript Latest Draft (ECMA-262)SharedArrayBuffer.prototype.byteLength | Draft | Initial definition in ES2017. |