SharedArrayBuffer.prototype.maxByteLength
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
SharedArrayBuffer
实例的 maxByteLength
访问器属性返回此 SharedArrayBuffer
可以增长到的最大长度(以字节为单位)。
¥The maxByteLength
accessor property of SharedArrayBuffer
instances returns the maximum length (in bytes) that this SharedArrayBuffer
can be grown to.
描述
¥Description
maxByteLength
属性是一个访问器属性,其设置的访问器函数为 undefined
,这意味着你只能读取该属性。该值是在构造共享数组时确定的,通过 SharedArrayBuffer()
构造函数的 maxByteLength
选项设置,并且不能更改。
¥The maxByteLength
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, set via the maxByteLength
option of the SharedArrayBuffer()
constructor, and cannot be changed.
如果构造此 SharedArrayBuffer
时未指定 maxByteLength
值,则此属性返回的值等于 SharedArrayBuffer
的 byteLength
的值。
¥If this SharedArrayBuffer
was constructed without specifying a maxByteLength
value, this property returns a value equal to the value of the SharedArrayBuffer
's byteLength
.
示例
使用最大字节长度
规范
Specification |
---|
ECMAScript Language Specification # sec-get-sharedarraybuffer.prototype.maxbytelength |
浏览器兼容性
BCD tables only load in the browser
也可以看看
¥See also