aboutsummaryrefslogtreecommitdiffstats
path: root/.config/polyfillListIE.js
diff options
context:
space:
mode:
Diffstat (limited to '.config/polyfillListIE.js')
-rw-r--r--.config/polyfillListIE.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/.config/polyfillListIE.js b/.config/polyfillListIE.js
new file mode 100644
index 0000000..dbffbc5
--- /dev/null
+++ b/.config/polyfillListIE.js
@@ -0,0 +1,31 @@
+/* global SVGElement */
+/* eslint no-new-object: "off" */
+
+import CustomEventPolyfill from '@target/custom-event-polyfill/src/index.js6'
+import children from '../src/polyfills/children.js'
+
+/* IE 11 has no innerHTML on SVGElement */
+import '../src/polyfills/innerHTML.js'
+
+/* IE 11 has no correct CustomEvent implementation */
+CustomEventPolyfill()
+
+/* IE 11 has no children on SVGElement */
+try {
+ if (!SVGElement.prototype.children) {
+ Object.defineProperty(SVGElement.prototype, 'children', {
+ get: function () { return children(this) }
+ })
+ }
+} catch (e) {}
+
+/* IE 11 cannot handle getPrototypeOf(not_obj) */
+try {
+ delete Object.getPrototypeOf('test')
+} catch (e) {
+ var old = Object.getPrototypeOf
+ Object.getPrototypeOf = function (o) {
+ if (typeof o !== 'object') o = new Object(o)
+ return old.call(this, o)
+ }
+}