Skip to content

Commit

Permalink
Fix IE11 errors and polyfills (#1255)
Browse files Browse the repository at this point in the history
* 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 <[email protected]> Josef Bredreck <[email protected]>
  • Loading branch information
Ofer Shaal and JosefBredereck authored Sep 6, 2020
1 parent 71386d0 commit 1b6ff9f
Show file tree
Hide file tree
Showing 24 changed files with 1,795 additions and 2,496 deletions.
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 <[email protected]>",
"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

0 comments on commit 1b6ff9f

Please sign in to comment.