Removed support for IE 10 and Safari 8

This commit is contained in:
Steve Gravrock
2021-04-22 19:16:06 -07:00
parent c2b558a2da
commit c2a714f168
25 changed files with 139 additions and 432 deletions
-25
View File
@@ -1,25 +0,0 @@
/* eslint-disable compat/compat */
(function(env) {
function hasFunctioningArrayBuffers() {
if (typeof ArrayBuffer === 'undefined') {
return false;
}
try {
var buffer = new ArrayBuffer(2);
var view8bit = new Uint8Array(buffer);
var view16bit = new Uint16Array(buffer);
view16bit[0] = 0xabcd;
return view8bit[0] === 0xcd && view8bit[1] === 0xab;
} catch (e) {
return false;
}
}
env.requireFunctioningArrayBuffers = function() {
env.requireFunctioningTypedArrays();
if (!hasFunctioningArrayBuffers()) {
env.pending('Browser has incomplete or missing support for ArrayBuffer');
}
};
})(jasmine.getEnv());
-45
View File
@@ -1,50 +1,5 @@
/* eslint-disable compat/compat */
(function(env) {
env.hasFunctioningMaps = function() {
if (typeof Map === 'undefined') {
return false;
}
try {
var s = new Map();
s.set('a', 1);
s.set('b', 2);
if (s.size !== 2) {
return false;
}
if (s.has('a') !== true) {
return false;
}
var iterations = 0;
var ifForEachWorking = true;
s.forEach(function(value, key, map) {
ifForEachWorking = ifForEachWorking && map === s;
if (key === 'a') {
ifForEachWorking = ifForEachWorking && value === 1;
}
iterations++;
});
if (iterations !== 2) {
return false;
}
if (ifForEachWorking !== true) {
return false;
}
return true;
} catch (e) {
return false;
}
};
env.requireFunctioningMaps = function() {
if (!env.hasFunctioningMaps()) {
env.pending('Browser has incomplete or missing support for Maps');
}
};
env.requireWeakMaps = function() {
if (typeof WeakMap === 'undefined') {
env.pending('Browser does not have support for WeakMap');
-49
View File
@@ -1,54 +1,5 @@
/* eslint-disable compat/compat */
(function(env) {
env.hasFunctioningSets = function() {
if (typeof Set === 'undefined') {
return false;
}
try {
var s = new Set();
s.add(1);
s.add(2);
if (s.size !== 2) {
return false;
}
if (s.has(1) !== true) {
return false;
}
var iterations = 0;
var isForEachWorking = true;
s.forEach(function(value, key, set) {
isForEachWorking = isForEachWorking && set === s;
if (iterations === 0) {
isForEachWorking = isForEachWorking && key === value && value === 1;
} else if (iterations === 1) {
isForEachWorking = isForEachWorking && key === value && value === 2;
}
iterations++;
});
if (iterations !== 2) {
return false;
}
if (isForEachWorking !== true) {
return false;
}
return true;
} catch (e) {
return false;
}
};
env.requireFunctioningSets = function() {
if (!env.hasFunctioningSets()) {
env.pending('Browser has incomplete or missing support for Sets');
}
};
env.requireWeakSets = function() {
if (typeof WeakSet === 'undefined') {
env.pending('Browser does not have support for WeakSet');
-24
View File
@@ -1,24 +0,0 @@
/* eslint-disable compat/compat */
(function(env) {
function hasFunctioningTypedArrays() {
if (typeof Uint32Array === 'undefined') {
return false;
}
try {
var a = new Uint32Array([1, 2, 3]);
if (a.length !== 3) {
return false;
}
return true;
} catch (e) {
return false;
}
}
env.requireFunctioningTypedArrays = function() {
if (!hasFunctioningTypedArrays()) {
env.pending('Browser has incomplete or missing support for typed arrays');
}
};
})(jasmine.getEnv());