TypedArray.prototype.byteOffset
TypedArray
实例的 byteOffset
访问器属性返回此类型化数组相对于其 ArrayBuffer
或 SharedArrayBuffer
开头的偏移量(以字节为单位)。
¥The byteOffset
accessor property of TypedArray
instances returns the offset (in bytes) of this typed array from the start of its ArrayBuffer
or SharedArrayBuffer
.
描述
¥Description
byteOffset
属性是一个访问器属性,其设置的访问器函数为 undefined
,这意味着你只能读取该属性。该值是在构造 TypedArray 时确定的,并且无法更改。TypedArray 是 类型数组对象.1 之一。
¥The byteOffset
property is an accessor property whose set accessor function is undefined
, meaning that you can only read this property. The value is established when a TypedArray is constructed and cannot be changed. TypedArray is one of the TypedArray objects.
示例
使用 byteOffset 属性
规范
Specification |
---|
ECMAScript Language Specification # sec-get-%typedarray%.prototype.byteoffset |
浏览器兼容性
BCD tables only load in the browser
也可以看看
¥See also