Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
byteLength は DataView インスタンスのアクセサープロパティで、このビューの長さを(バイト単位で)返します。
byteLengthプロパティはアクセサープロパティであり、その設定アクセサー関数は undefined であるため、このプロパティは読み取り専用です。DataView が 長さ追跡 である場合、その長さは基盤となるバッファーの長さに依存し、バッファのサイズ変更時に変更されることがあります。そうでない場合、値は DataView の構築時に確定され、変更できません。長さ追跡の有無にかかわらず、基盤となるバッファーのサイズ変更により表示範囲ができなくなった場合、byteLength は 0 になります。
| ECMAScript® 2027 Language Specification # sec-get-dataview.prototype.bytelength |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2026年3月2日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.