File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 2
2
3
3
( function ( ) {
4
4
5
+ var rbadVersions = / ^ [ 1 2 ] \. / ;
6
+
5
7
// Support: IE9 only
6
8
// IE9 only creates console object when dev tools are first opened
7
- // Also, avoid Function#bind here to simplify PhantomJS usage
8
- var log = window . console && window . console . log &&
9
- function ( ) {
10
- window . console . log . apply ( window . console , arguments ) ;
11
- } ,
12
- rbadVersions = / ^ [ 1 2 ] \. / ;
13
-
14
- if ( ! log ) {
9
+ // IE9 console is a host object, callable but doesn't have .apply()
10
+ if ( ! window . console || ! window . console . log ) {
15
11
return ;
16
12
}
17
13
18
14
// Need jQuery 3.0.0+ and no older Migrate loaded
19
15
if ( ! jQuery || rbadVersions . test ( jQuery . fn . jquery ) ) {
20
- log ( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" ) ;
16
+ window . console . log ( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" ) ;
21
17
}
22
18
if ( jQuery . migrateWarnings ) {
23
- log ( "JQMIGRATE: Migrate plugin loaded multiple times" ) ;
19
+ window . console . log ( "JQMIGRATE: Migrate plugin loaded multiple times" ) ;
24
20
}
25
21
26
22
// Show a message on the console so devs know we're active
27
- log ( "JQMIGRATE: Migrate is installed" +
23
+ window . console . log ( "JQMIGRATE: Migrate is installed" +
28
24
( jQuery . migrateMute ? "" : " with logging active" ) +
29
25
", version " + jQuery . migrateVersion ) ;
30
26
You can’t perform that action at this time.
0 commit comments