SharedArrayBuffer.prototype.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
Living Standard Initial definition in ES2017.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support6016

55

46 — 541

No No10.1
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic support6060 ?

55

46 — 541

No No No

1. From version 46 until version 54 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.

See also

文档标签和贡献者

标签: 
 此页面的贡献者: xgqfrms-GitHub
 最后编辑者: xgqfrms-GitHub,