← Back to release summary

ArrayBuffer.prototype.transfer

Category
JavaScript
Type
Chromium catches up
Status
Enabled by default (Chrome 114)
Intent stage
Prepare to ship

Summary

Adds the ArrayBuffer.prototype.transfer method, which copies the receiver buffer, detaches the receiver, then returns the copy. This adds a JS API for what is possible via structured cloning. Also adds ArrayBuffer.prototype.transferToFixedLength and the ArrayBuffer.prototype.detached getter. This is a TC39 proposal.

Standards & signals

Docs: https://github.com/tc39/proposal-arraybuffer-transfer

View on chromestatus.com