Skip to content

Commit 1b6ff9f

Browse files
Ofer ShaalJosefBredereck
andauthored
Fix IE11 errors and polyfills (#1255)
* Fix IE11 error - SCRIPT438: Object doesn't support property or method 'forEach' * Update uikit polyfills to run pl in ie11 * Update packages/uikit-workshop/src/scripts/components/modal-styleguide.js * Update modal-styleguide.js Co-authored-by: Ofer Shaal <ofer@3paces.com> Josef Bredreck <slime.games@outlook.de>
1 parent 71386d0 commit 1b6ff9f

24 files changed

+1795
-2496
lines changed

packages/uikit-polyfills/index.js

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,21 @@
1-
/**
2-
@license
3-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7-
Code distributed by Google as part of the polymer project is also
8-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9-
*/
10-
11-
/*
12-
* Polyfills loaded: HTML Imports, Custom Elements, platform polyfills, template
13-
* Used in: IE 11
14-
*/
15-
161
import 'regenerator-runtime/runtime';
17-
import '@webcomponents/template/template.js';
18-
import 'core-js/modules/es.array.find';
2+
import 'custom-event-polyfill';
3+
import 'get-own-property-symbols';
4+
import '@webcomponents/webcomponentsjs/webcomponents-bundle';
195

206
import 'element-closest';
217
import 'core-js/modules/es.string.includes';
8+
import 'core-js/modules/es.string.trim-end';
9+
import 'core-js/modules/es.string.trim-start';
10+
import 'core-js/modules/es.string.code-point-at';
11+
import 'core-js/modules/es.string.starts-with';
12+
import 'core-js/modules/es.number.is-nan';
13+
import 'core-js/modules/es.array.find';
2214
import 'core-js/modules/es.array.includes';
23-
// import 'core-js/modules/es.array.from';
24-
// import 'core-js/modules/es.object.assign';
25-
26-
import './platform/remove-polyfill.js';
27-
import './platform/es6-misc';
28-
import './platform/custom-event';
29-
import './platform/promise';
30-
import './platform/symbol';
31-
import './platform/flag-parser';
32-
// import '@webcomponents/custom-elements/src/custom-elements.js';
33-
34-
import '@webcomponents/custom-elements/src/custom-elements.js';
35-
36-
// import 'document-register-element';
37-
// by default, the second argument is 'auto'
38-
// but it could be also 'force'
39-
// which ignores feature detection and force
40-
// the polyfill version of CustomElements
41-
// installCE(global, 'auto');
42-
43-
import '@webcomponents/url/url.js';
44-
import './platform/baseuri';
45-
import './platform/unresolved';
46-
15+
import 'core-js/modules/es.array.from';
4716
import 'core-js/modules/es.array.for-each';
48-
49-
if (window.NodeList && !NodeList.prototype.forEach) {
50-
NodeList.prototype.forEach = Array.prototype.forEach;
51-
}
52-
53-
// import 'core-js/modules/es.string.trim-end';
54-
// import 'core-js/modules/es.string.trim-start';
55-
// import 'core-js/modules/es.string.code-point-at';
56-
// import 'core-js/modules/es.number.is-nan';
17+
import 'core-js/modules/es.object.assign';
18+
import 'core-js/modules/es.promise';
19+
import 'core-js/es6/symbol';
20+
import 'core-js/web/dom-collections';
21+
import 'core-js/web/url-search-params';

packages/uikit-polyfills/package.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,11 @@
66
"author": "Salem Ghoweri <me@salemghoweri.com>",
77
"license": "MIT",
88
"dependencies": {
9-
"@ungap/weakset": "^0.1.5",
10-
"@webcomponents/custom-elements": "^1.3.0",
11-
"@webcomponents/shadycss": "^1.9.2",
12-
"@webcomponents/shadydom": "^1.6.1",
13-
"@webcomponents/template": "^1.4.1",
14-
"@webcomponents/url": "^0.7.4",
15-
"@webcomponents/webcomponentsjs": "^2.3.0",
16-
"core-js": "^3.3.6",
9+
"@webcomponents/webcomponentsjs": "^2.4.4",
10+
"core-js": "^3.6.5",
1711
"custom-event-polyfill": "^1.0.7",
18-
"document-register-element": "^1.14.3",
19-
"es6-promise": "^4.2.8",
20-
"get-own-property-symbols": "^0.9.3",
21-
"promise-polyfill": "^8.0.0"
12+
"element-closest": "^3.0.2",
13+
"get-own-property-symbols": "^0.9.4"
2214
},
2315
"publishConfig": {
2416
"access": "public"

packages/uikit-polyfills/platform/baseuri.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

packages/uikit-polyfills/platform/custom-event.js

Lines changed: 0 additions & 122 deletions
This file was deleted.

packages/uikit-polyfills/platform/es6-misc.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

packages/uikit-polyfills/platform/flag-parser.js

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)