TypedArray.prototype.buffer
buffer
アクセサープロパティは、構築時に TypedArray から参照されるようになった ArrayBuffer
を表します。
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
解説
buffer
プロパティは set アクセサープロパティが undefined
であるアクセサープロパティです。これは、このプロパティが読み取り専用であることを意味します。値は TypedArray が構築されたときに確立し、変更することができません。 TypedArray は型付き配列オブジェクトのうちの一つです。
例
buffer プロパティの使用
var buffer = new ArrayBuffer(8);
var uint16 = new Uint16Array(buffer);
uint16.buffer; // ArrayBuffer { byteLength: 8 }
仕様書
ブラウザーの互換性
BCD tables only load in the browser