Immutable ArrayBuffers
- Category
- JavaScript
- Type
- Chromium catches up
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: Covered by Test262
Summary
A TC39 proposal for immutable ArrayBuffers. This proposal adds to ArrayBuffer.prototype one read-only accessor: * `immutable: boolean` -- is this buffer immutable, or can its contents be changed? and two methods: * `transferToImmutable(newByteLength?: number) : ArrayBuffer` -- move the contents of the original buffer into a new immutable buffer, detach the original buffer, and return the new buffer. * `sliceToImmutable(start?: number, end?: number) : ArrayBuffer` -- create a new immutable buffer from a range of the original buffer's contents. An immutable buffer cannot be detached, resized, or further transferred.
Standards & signals
- Specification: https://tc39.es/proposal-immutable-arraybuffer
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/450237486
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=immutable-arraybuffers
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Immutable%20ArrayBuffers
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Immutable%20ArrayBuffers
- Baseline status: https://webstatus.dev/?q=Immutable%20ArrayBuffers
Explainers: https://github.com/tc39/proposal-immutable-arraybuffer