The SharedArrayBuffer.prototype
property represents the prototype for the SharedArrayBuffer
object.
Property attributes of SharedArrayBuffer.prototype |
|
---|---|
Writable | no |
Enumerable | no |
Configurable | no |
Description
SharedArrayBuffer
instances inherit from SharedArrayBuffer.prototype
. As with all constructors, you can change the constructor's prototype object to make changes to all SharedArrayBuffer
instances.
Properties
- SharedArrayBuffer.prototype.constructor
- Specifies the function that creates an object's prototype. The initial value is the standard built-in
SharedArrayBuffer
constructor. SharedArrayBuffer.prototype.byteLength
Read only- The size, in bytes, of the array. This is established when the array is constructed and cannot be changed. Read only.
Methods
SharedArrayBuffer.prototype.slice(begin, end)
- Returns a new
SharedArrayBuffer
whose contents are a copy of thisSharedArrayBuffer
's bytes frombegin
, inclusive, up toend
, exclusive. If eitherbegin
orend
is negative, it refers to an index from the end of the array, as opposed to from the beginning.
Specifications
Specification | Status | Comment |
---|---|---|
ECMAScript Latest Draft (ECMA-262) The definition of 'SharedArrayBuffer.prototype' in that specification. |
Living Standard | Initial definition in ES2017. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 60 | 16 | 55 46 — 541 | No | No | 10.1 |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | 60 | 60 | ? | 55 46 — 541 | No | No | No |
1. From version 46 until version 54 (exclusive): this feature is behind the javascript.options.shared_memory
preference (needs to be set to true
). To change preferences in Firefox, visit about:config.