[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable [Back]  [Original]

ArrayBuffer.prototype.resizable - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

ArrayBuffer.prototype.resizable

Baseline 2024
Newly available

Since 2024 7, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

ArrayBuffer resizable .

In this article

const buffer1 = new ArrayBuffer(8, { maxByteLength: 16 });
const buffer2 = new ArrayBuffer(8);

console.log(buffer1.resizable);
// Expected output: true

console.log(buffer2.resizable);
// Expected output: false

resizeable undefined . . maxByteLength resizeable true false .

resizable

16 8 resizable resizable true .

js
const buffer = new ArrayBuffer(8, { maxByteLength: 16 });

if (buffer.resizable) {
  console.log("Buffer is resizable!");
  buffer.resize(12);
}

Specification
ECMAScript 2027 LanguageSpecification
# sec-get-arraybuffer.prototype.resizable


Web Proxy Viewer  |  New URL  |  Original Page