SharedArrayBuffer.prototype.growable
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.
SharedArrayBuffer ì¸ì¤í´ì¤ì growable ì ê·¼ì ìì±ì SharedArrayBuffer í¬ê¸°ê° ì»¤ì§ ì ìëì§ ì¬ë¶ë¥¼ ë°íí©ëë¤.
ì¤ëª
growable ìì±ì ì¤ì ì ê·¼ì í¨ìê° undefinedì¸ ì ê·¼ì ìì±ì¼ë¡, ì½ê¸°ë§ ê°ë¥í©ëë¤. ì´ ê°ì ë°°ì´ì´ ìì±ë ë ì¤ì ë©ëë¤. ìì±ììì maxByteLength ìµì
ì´ ì¤ì ëë©´, growableì true를 ë°ííê³ ê·¸ë ì§ ìì¼ë©´ false를 ë°íí©ëë¤.
ìì
>growable ì¬ì©í기
ìµë 16ë°ì´í¸ê¹ì§ ëì´ë ì ìë 8ë°ì´í¸ ë²í¼ë¥¼ ìì±íê³ growable ìì±ì íì¸í´ì growableì´ trueë¼ë©´ í¬ê¸°ë¥¼ ë리ë ìì ì
ëë¤.
js
const buffer = new SharedArrayBuffer(8, { maxByteLength: 16 });
if (buffer.growable) {
console.log("SAB is growable!");
buffer.grow(12);
}
ëª ì¸ì
| Specification |
|---|
| ECMAScript® 2027 Language Specification> # sec-get-sharedarraybuffer.prototype.growable> |