Remove IE polyfills

This commit is contained in:
Xaver Maierhofer 2020-05-31 10:51:50 +02:00
parent 522908676c
commit 6e35ace89d
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8
5 changed files with 1 additions and 34 deletions

View File

@ -6,8 +6,6 @@ module.exports = function (gulp, plugins, config) {
.pipe(gulp.dest(config.build));
gulp.src(['polyfill.js'])
.pipe(gulp.dest(config.build + '/vendor'));
gulp.src(['node_modules/promise-polyfill/dist/polyfill.js'])
.pipe(gulp.dest(config.build + '/vendor/promise'));
return gulp.src(['assets/fonts/*', 'assets/icons/fonts/*'])
.pipe(gulp.dest(config.build + '/fonts'));
};

View File

@ -30,7 +30,6 @@
<!-- contents of html partials will be injected here -->
<!-- endinject -->
<script src="vendor/polyfill.js" inline></script>
<script src="vendor/promise/polyfill.js" inline></script>
<script src="app.js"></script>
</head>
<body>

View File

@ -55,7 +55,6 @@
"moment": "^2.26.0",
"navigo": "^7.1.2",
"node-polyglot": "2.2.2",
"promise-polyfill": "^8.1.3",
"rbush": "^3.0.1",
"requirejs": "^2.3.6",
"snabbdom": "^0.7.4"

View File

@ -1,12 +1,6 @@
'use strict';
// Polyfills for (old) mobile browsers and IE 11
// Polyfills for (old) firefox 75
// From https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/
if (!String.prototype.includes) {
String.prototype.includes = function () {
return String.prototype.indexOf.apply(this, arguments) !== -1;
};
}
if (typeof Object.assign !== 'function') {
Object.assign = function (target, varArgs) { // .length of function is 2
if (target == null) { // TypeError if undefined or null
@ -31,24 +25,6 @@ if (typeof Object.assign !== 'function') {
};
}
// eslint-disable-next-line consistent-return
(function () {
if (typeof window.CustomEvent === 'function') {
return false;
}
function CustomEvent(event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
}
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
})();
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}

View File

@ -5387,11 +5387,6 @@ progress@^2.0.0:
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
promise-polyfill@^8.1.3:
version "8.1.3"
resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.1.3.tgz#8c99b3cf53f3a91c68226ffde7bde81d7f904116"
integrity sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==
prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"