Skip to content

Fix IE11 error - SCRIPT438: Object doesn't support property or method 'forEach' #1255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 15 additions & 50 deletions packages/uikit-polyfills/index.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,21 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/

/*
* Polyfills loaded: HTML Imports, Custom Elements, platform polyfills, template
* Used in: IE 11
*/

import 'regenerator-runtime/runtime';
import '@webcomponents/template/template.js';
import 'core-js/modules/es.array.find';
import 'custom-event-polyfill';
import 'get-own-property-symbols';
import '@webcomponents/webcomponentsjs/webcomponents-bundle';

import 'element-closest';
import 'core-js/modules/es.string.includes';
import 'core-js/modules/es.string.trim-end';
import 'core-js/modules/es.string.trim-start';
import 'core-js/modules/es.string.code-point-at';
import 'core-js/modules/es.string.starts-with';
import 'core-js/modules/es.number.is-nan';
import 'core-js/modules/es.array.find';
import 'core-js/modules/es.array.includes';
// import 'core-js/modules/es.array.from';
// import 'core-js/modules/es.object.assign';

import './platform/remove-polyfill.js';
import './platform/es6-misc';
import './platform/custom-event';
import './platform/promise';
import './platform/symbol';
import './platform/flag-parser';
// import '@webcomponents/custom-elements/src/custom-elements.js';

import '@webcomponents/custom-elements/src/custom-elements.js';

// import 'document-register-element';
// by default, the second argument is 'auto'
// but it could be also 'force'
// which ignores feature detection and force
// the polyfill version of CustomElements
// installCE(global, 'auto');

import '@webcomponents/url/url.js';
import './platform/baseuri';
import './platform/unresolved';

import 'core-js/modules/es.array.from';
import 'core-js/modules/es.array.for-each';

if (window.NodeList && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = Array.prototype.forEach;
}

// import 'core-js/modules/es.string.trim-end';
// import 'core-js/modules/es.string.trim-start';
// import 'core-js/modules/es.string.code-point-at';
// import 'core-js/modules/es.number.is-nan';
import 'core-js/modules/es.object.assign';
import 'core-js/modules/es.promise';
import 'core-js/es6/symbol';
import 'core-js/web/dom-collections';
import 'core-js/web/url-search-params';
16 changes: 4 additions & 12 deletions packages/uikit-polyfills/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,11 @@
"author": "Salem Ghoweri <me@salemghoweri.com>",
"license": "MIT",
"dependencies": {
"@ungap/weakset": "^0.1.5",
"@webcomponents/custom-elements": "^1.3.0",
"@webcomponents/shadycss": "^1.9.2",
"@webcomponents/shadydom": "^1.6.1",
"@webcomponents/template": "^1.4.1",
"@webcomponents/url": "^0.7.4",
"@webcomponents/webcomponentsjs": "^2.3.0",
"core-js": "^3.3.6",
"@webcomponents/webcomponentsjs": "^2.4.4",
"core-js": "^3.6.5",
"custom-event-polyfill": "^1.0.7",
"document-register-element": "^1.14.3",
"es6-promise": "^4.2.8",
"get-own-property-symbols": "^0.9.3",
"promise-polyfill": "^8.0.0"
"element-closest": "^3.0.2",
"get-own-property-symbols": "^0.9.4"
},
"publishConfig": {
"access": "public"
Expand Down
39 changes: 0 additions & 39 deletions packages/uikit-polyfills/platform/baseuri.js

This file was deleted.

122 changes: 0 additions & 122 deletions packages/uikit-polyfills/platform/custom-event.js

This file was deleted.

38 changes: 0 additions & 38 deletions packages/uikit-polyfills/platform/es6-misc.js

This file was deleted.

69 changes: 0 additions & 69 deletions packages/uikit-polyfills/platform/flag-parser.js

This file was deleted.

Loading