Spec-Zone.ru › JavaScript

ArrayBuffer.prototype.detached

Baseline Widely available

This feature is well established and works across many devices and browser versions. It's been available across browsers since March 2024.

The detached accessor property of ArrayBuffer instances returns a boolean indicating whether or not this buffer has been detached (transferred).

Description

The detached property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. The value is false when the ArrayBuffer is first created. The value becomes true if the ArrayBuffer is transferred, which detaches the instance from its underlying memory. Once a buffer becomes detached, it is no longer usable.

Examples

Using detached

const buffer = new ArrayBuffer(8);
console.log(buffer.detached); // false
const newBuffer = buffer.transfer();
console.log(buffer.detached); // true
console.log(newBuffer.detached); // false

Specifications

Specification
ECMAScript® 2027 Language Specification
# sec-get-arraybuffer.prototype.detached

Browser compatibility

Desktop Mobile Server
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on iOS Samsung Internet WebView Android WebView on iOS Bun Deno Node.js
detached
114
114
122
100
17.4
114
122
76
17.4
23.0
114
17.4
1.0.19
1.33
21.0.0

See also

  • Polyfill of ArrayBuffer.prototype.detached in core-js
  • es-shims polyfill of ArrayBuffer.prototype.detached
  • ArrayBuffer
  • ArrayBuffer.prototype.transfer()
  • ArrayBuffer.prototype.transferToFixedLength()

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API