SharedArrayBuffer.prototype.byteLength

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

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

Using byteLength

var sab = new SharedArrayBuffer(1024);
sab.byteLength; // 1024

Specifications

Specification
ECMAScript Language Specification
# sec-get-sharedarraybuffer.prototype.bytelength

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobileserver
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebView AndroidChrome AndroidFirefox for AndroidOpera AndroidSafari on iOSSamsung InternetDenoNode.js
byteLength

Legend

Full support
Full support
No support
No support
See implementation notes.
User must explicitly enable this feature.

See also