Obsolete since Gecko 34 (Firefox 34 / Thunderbird 34 / SeaMonkey 2.31)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
The move()
method used to copy the sequence of array elements within the array to the position starting at target
. However, this non-standard method has been replaced with the standard TypedArray.prototype.copyWithin()
method. TypedArray is one of the typed array types here.
Syntax
typedarray.move(start, end, target)
Parameters
- start
- Source start index position where to start copying elements from.
- end
- Source end index position where to end copying elements from.
- target
- Target start index position where to copy the elements to.
Return value
The modified type array.
Examples
Using the move
method
var buffer = new ArrayBuffer(8); var uint8 = new Uint8Array(buffer); uint8.set([1,2,3]); console.log(uint8); // Uint8Array [ 1, 2, 3, 0, 0, 0, 0, 0 ] uint8.move(0,3,3); console.log(uint8); // Uint8Array [ 1, 2, 3, 1, 2, 3, 0, 0 ]
Specifications
Not part of any standard. Superseded by TypedArray.prototype.copyWithin()
.
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | No support | No support [1] | No support | No support | No support |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | No support | No support | No support | No support | No support | No support |
[1] Supported in Firefox 16 to 34 in Aurora and Nightly channels only.
See also
Document Tags and Contributors
Tags:
Contributors to this page:
eduardoboucas,
fscholz
Last updated by:
eduardoboucas,