ArrayBuffer.prototype.resizable
Baseline
2024
Newly available
Since July 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
ArrayBuffer ì¸ì¤í´ì¤ì resizable ì ê·¼ì ìì±ì ë°°ì´ ë²í¼ê° í¬ê¸° ì¡°ì ì´ ê°ë¥íì§ ë¶ê°íì§ ì¬ë¶ë¥¼ ë°íí©ëë¤.
ìëí´ ë³´ê¸°
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를 ë°ííë©´ í¬ê¸°ë¥¼ ì¡°ì í©ëë¤.
const buffer = new ArrayBuffer(8, { maxByteLength: 16 });
if (buffer.resizable) {
console.log("Buffer is resizable!");
buffer.resize(12);
}
ëª ì¸ì
| Specification |
|---|
| ECMAScript® 2027 Language Specification> # sec-get-arraybuffer.prototype.resizable> |