1
1
/*
2
2
* required polyfills
3
3
*/
4
- import "core-js" ;
5
- import 'core-js/features/set/map' ;
6
- import 'core-js/features/map' ;
7
4
8
5
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
9
- // import 'core-js/es6/symbol'
10
- // import 'core-js/es6/object'
11
- // import 'core-js/es6/function'
12
- // import 'core-js/es6/parse-int'
13
- // import 'core-js/es6/parse-float'
14
- // import 'core-js/es6/number'
15
- // import 'core-js/es6/math'
16
- // import 'core-js/es6/string'
17
- // import 'core-js/es6/date'
18
- // import 'core-js/es6/array'
19
- // import 'core-js/es6/regexp'
20
- // import 'core-js/es6/map'
21
- // import 'core-js/es6/weak-map'
22
- // import 'core-js/es6/set'
23
- // import 'core-js/es7/object'
6
+ // import "core-js";
7
+ // import 'core-js/features/symbol'
8
+ // import 'core-js/features/object'
9
+ // import 'core-js/features/function'
10
+ // import 'core-js/features/parse-int'
11
+ // import 'core-js/features/parse-float'
12
+ // import 'core-js/features/number'
13
+ // import 'core-js/features/math'
14
+ // import 'core-js/features/string'
15
+ // import 'core-js/features/date'
16
+ // import 'core-js/features/array'
17
+ // import 'core-js/features/regexp'
18
+ // import 'core-js/features/map'
19
+ // import 'core-js/features/weak-map'
20
+ // import 'core-js/features/set'
21
+ // import 'core-js/features/set/map';
24
22
25
23
/** IE10 and IE11 requires the following for the Reflect API. */
26
- // import 'core-js/es6 /reflect'
24
+ // import 'core-js/features /reflect';
27
25
28
26
/** Evergreen browsers require these. **/
29
27
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
30
- // import 'core-js/es7 /reflect'
28
+ // import 'core-js/features /reflect'
31
29
32
30
// CustomEvent() constructor functionality in IE9, IE10, IE11
33
31
( function ( ) {
@@ -45,3 +43,21 @@ import 'core-js/features/map';
45
43
46
44
window . CustomEvent = CustomEvent
47
45
} ) ( )
46
+
47
+ if ( ! Element . prototype . matches ) {
48
+ Element . prototype . matches =
49
+ Element . prototype . msMatchesSelector ||
50
+ Element . prototype . webkitMatchesSelector ;
51
+ }
52
+
53
+ if ( ! Element . prototype . closest ) {
54
+ Element . prototype . closest = function ( s ) {
55
+ var el = this ;
56
+
57
+ do {
58
+ if ( Element . prototype . matches . call ( el , s ) ) return el ;
59
+ el = el . parentElement || el . parentNode ;
60
+ } while ( el !== null && el . nodeType === 1 ) ;
61
+ return null ;
62
+ } ;
63
+ }
0 commit comments