静态
Atomics
.store()
method stores a given value at the given position in the array and returns that value.
Atomics.store(typedArray, index, value)
typedArray
Int8Array
,
Uint8Array
,
Int16Array
,
Uint16Array
,
Int32Array
,
Uint32Array
,
BigInt64Array
,或
BigUint64Array
.
index
typedArray
to store a
value
in.
value
The number to store.
The value that has been stored.
TypeError
, if
typedArray
is not one of the allowed integer types.
RangeError
, if
index
is out of bounds in the
typedArray
.
var sab = new SharedArrayBuffer(1024); var ta = new Uint8Array(sab); Atomics.store(ta, 0, 12); // 12
| 规范 |
|---|
|
ECMAScript (ECMA-262)
The definition of 'Atomics.store' in that specification. |
| Desktop | Mobile | Server | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
store
|
Chrome
68
|
Edge
79
|
Firefox
78
|
IE No | Opera No | Safari 10.1 — 11.1 |
WebView Android
60 — 63
|
Chrome Android
60 — 63
|
Firefox Android
57
Disabled
|
Opera Android No | Safari iOS 10.3 — 11.3 |
Samsung Internet Android
No
|
nodejs 8.10.0 |
完整支持
不支持
见实现注意事项。
用户必须明确启用此特征。
Atomics
Object
Object.prototype.__defineGetter__()
Object.prototype.__defineSetter__()
Object.prototype.__lookupGetter__()
Object.prototype.__lookupSetter__()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()
Object.prototype.toLocaleString()
Object.prototype.toSource()
Object.prototype.toString()
Object.prototype.valueOf()
Object.setPrototypeOf()