@@ -5,15 +5,24 @@ Float32Array.prototype.slice = Float32Array.prototype.slice || function(a, b) {
55Float64Array . prototype . slice = Float64Array . prototype . slice || function ( a , b ) {
66 return new Float64Array ( Array . from ( this ) . slice ( a , b ) ) ;
77} ;
8- Uint32Array . prototype . slice = Float64Array . prototype . slice || function ( a , b ) {
8+ Uint32Array . prototype . slice = Uint32Array . prototype . slice || function ( a , b ) {
99 return new Uint32Array ( Array . from ( this ) . slice ( a , b ) ) ;
1010} ;
11- Uint16Array . prototype . slice = Float64Array . prototype . slice || function ( a , b ) {
11+ Int32Array . prototype . slice = Int32Array . prototype . slice || function ( a , b ) {
12+ return new Int32Array ( Array . from ( this ) . slice ( a , b ) ) ;
13+ } ;
14+ Uint16Array . prototype . slice = Uint16Array . prototype . slice || function ( a , b ) {
1215 return new Uint16Array ( Array . from ( this ) . slice ( a , b ) ) ;
1316} ;
14- Uint8Array . prototype . slice = Float64Array . prototype . slice || function ( a , b ) {
17+ Int16Array . prototype . slice = Int16Array . prototype . slice || function ( a , b ) {
18+ return new Int16Array ( Array . from ( this ) . slice ( a , b ) ) ;
19+ } ;
20+ Uint8Array . prototype . slice = Uint8Array . prototype . slice || function ( a , b ) {
1521 return new Uint8Array ( Array . from ( this ) . slice ( a , b ) ) ;
1622} ;
23+ Int8Array . prototype . slice = Int8Array . prototype . slice || function ( a , b ) {
24+ return new Int8Array ( Array . from ( this ) . slice ( a , b ) ) ;
25+ } ;
1726
1827const ARRAY_ITER = function ( ) {
1928 let self = this ;
@@ -28,6 +37,9 @@ Float64Array.prototype[Symbol.iterator] = Float64Array.prototype[Symbol.iterator
2837Uint32Array . prototype [ Symbol . iterator ] = Uint32Array . prototype [ Symbol . iterator ] || ARRAY_ITER ;
2938Uint16Array . prototype [ Symbol . iterator ] = Uint16Array . prototype [ Symbol . iterator ] || ARRAY_ITER ;
3039Uint8Array . prototype [ Symbol . iterator ] = Uint8Array . prototype [ Symbol . iterator ] || ARRAY_ITER ;
40+ Int32Array . prototype [ Symbol . iterator ] = Int32Array . prototype [ Symbol . iterator ] || ARRAY_ITER ;
41+ Int16Array . prototype [ Symbol . iterator ] = Int16Array . prototype [ Symbol . iterator ] || ARRAY_ITER ;
42+ Int8Array . prototype [ Symbol . iterator ] = Int8Array . prototype [ Symbol . iterator ] || ARRAY_ITER ;
3143
3244// This was missing on the iPhone I tested.
3345window . performance = window . performance || { } ;
0 commit comments