Open
Description
What type of issue is this?
Incorrect support data (example: BrowserX says "86" but support was added in "40")
What information was incorrect, unhelpful, or incomplete?
Nodejs support for ArrayBuffer.prototype.detached
, ArrayBuffer.prototype.transfer
and ArrayBuffer.prototype.transferToFixedLength
What browsers does this problem apply to, if applicable?
Node.js
What did you expect to see?
The support was added in the node21.0.0 release.
Did you test this? If so, how?
I used asdf to install nodejs 21.0.0 to run this.
$ asdf install nodejs 21.0.0
$ ~/.asdf/installs/nodejs/21.0.0/bin/node
Welcome to Node.js v21.0.0.
Type ".help" for more information.
> const a = Uint8Array.from([1,2]).buffer
undefined
> a.detached
false
> const b = a.transfer();
undefined
> [a.detached, b.detached]
[ true, false ]
> new Uint8Array(a)
Uncaught TypeError: Cannot perform Construct on a detached ArrayBuffer
at new Uint8Array (<anonymous>)
> new Uint8Array(b)
Uint8Array(2) [ 1, 2 ]
> const c = b.transferToFixedLength(1)
undefined
> [b.detached, c.detached]
[ true, false ]
> new Uint8Array(c)
Uint8Array(1) [ 1 ]
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
https://nodejs.org/en/blog/announcements/v21-release-announce#v8-118
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
MDN metadata
MDN page report details
- Query:
javascript.builtins.ArrayBuffer
- Report started: 2025-03-14T11:54:42.532Z