Removed support for Internet Explorer

This commit is contained in:
Steve Gravrock
2021-07-23 19:48:53 -07:00
parent 623eecdcec
commit fe0a83ba87
51 changed files with 137 additions and 707 deletions

View File

@@ -1,26 +0,0 @@
(function(env) {
function getAsyncCtor() {
try {
eval('var func = async function(){};');
} catch (e) {
return null;
}
return Object.getPrototypeOf(func).constructor;
}
function hasAsyncAwaitSupport() {
return getAsyncCtor() !== null;
}
env.makeAsyncAwaitFunction = function() {
var AsyncFunction = getAsyncCtor();
return new AsyncFunction('');
};
env.requireAsyncAwait = function() {
if (!hasAsyncAwaitSupport()) {
env.pending('Environment does not support async/await functions');
}
};
})(jasmine.getEnv());

View File

@@ -1,8 +0,0 @@
/* eslint-disable compat/compat */
(function(env) {
env.requireWeakMaps = function() {
if (typeof WeakMap === 'undefined') {
env.pending('Browser does not have support for WeakMap');
}
};
})(jasmine.getEnv());

View File

@@ -1,8 +0,0 @@
/* eslint-disable compat/compat */
(function(env) {
env.requireWeakSets = function() {
if (typeof WeakSet === 'undefined') {
env.pending('Browser does not have support for WeakSet');
}
};
})(jasmine.getEnv());

View File

@@ -1,28 +0,0 @@
/* eslint-disable compat/compat */
(function(env) {
function hasFunctioningSymbols() {
if (typeof Symbol === 'undefined') {
return false;
}
try {
var s1 = Symbol();
var s2 = Symbol();
if (typeof s1 !== 'symbol') {
return false;
}
if (s1 === s2) {
return false;
}
return true;
} catch (e) {
return false;
}
}
env.requireFunctioningSymbols = function() {
if (!hasFunctioningSymbols()) {
env.pending('Browser has incomplete or missing support for Symbols');
}
};
})(jasmine.getEnv());

View File

@@ -1,17 +0,0 @@
/* eslint-disable compat/compat */
(function(env) {
function hasUrlConstructor() {
try {
new URL('http://localhost/');
return true;
} catch (e) {
return false;
}
}
env.requireUrls = function() {
if (!hasUrlConstructor()) {
env.pending('Environment does not support URLs');
}
};
})(jasmine.getEnv());

View File

@@ -1,22 +0,0 @@
(function(env) {
function getGeneratorFuncCtor() {
try {
eval('var func = function*() {}');
} catch (e) {
return null;
}
return Object.getPrototypeOf(func).constructor;
}
env.makeGeneratorFunction = function(text) {
var GeneratorFunction = getGeneratorFuncCtor();
return new GeneratorFunction(text || '');
};
env.requireGeneratorFunctions = function() {
if (!getGeneratorFuncCtor()) {
env.pending('Environment does not support generator functions');
}
};
})(jasmine.getEnv());

View File

@@ -1,7 +0,0 @@
(function(env) {
env.requirePromises = function() {
if (typeof Promise !== 'function') {
env.pending('Environment does not support promises');
}
};
})(jasmine.getEnv());