blob: 7c7fc33726f8f0e8f4d27a738b377d926616fb78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* 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)
}
}
|