| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/DataView/byteOffset | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.
DataView byteOffset ( ) ArrayBuffer SharedArrayBuffer .
// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);
const view = new DataView(buffer, 12, 4); // From byte 12 for the next 4 bytes
console.log(view.byteOffset);
// Expected output: 12
byteOffset undefined , . DataView . DataView .
const buffer = new ArrayBuffer(8);
const dataview = new DataView(buffer);
dataview.byteOffset; // 0 ( )
const dataview2 = new DataView(buffer, 3);
dataview2.byteOffset; // 3 (DataView )
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-get-dataview.prototype.byteoffset |
This page was last modified on 2025 2 11 by MDN contributors.
DataViewDataView.prototype.getBigInt64()DataView.prototype.getBigUint64()DataView.prototype.getFloat16()DataView.prototype.getFloat32()DataView.prototype.getFloat64()DataView.prototype.getInt8()DataView.prototype.getInt16()DataView.prototype.getInt32()DataView.prototype.getUint8()DataView.prototype.getUint16()DataView.prototype.getUint32()DataView.prototype.setBigInt64()DataView.prototype.setBigUint64()DataView.prototype.setFloat16()DataView.prototype.setFloat32()DataView.prototype.setFloat64()DataView.prototype.setInt8()DataView.prototype.setInt16()DataView.prototype.setInt32()DataView.prototype.setUint8()DataView.prototype.setUint16()DataView.prototype.setUint32()Object/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |