1
1
/*!
2
- * jQuery Migrate - v3.4.1 - 2023-02-23T15 :31Z
2
+ * jQuery Migrate - v3.5.2 - 2024-07-17T22 :31Z
3
3
* Copyright OpenJS Foundation and other contributors
4
4
*/
5
5
( function ( factory ) {
24
24
} ) ( function ( jQuery , window ) {
25
25
"use strict" ;
26
26
27
- jQuery . migrateVersion = "3.4.1 " ;
27
+ jQuery . migrateVersion = "3.5.2 " ;
28
28
29
29
// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2
30
30
function compareVersions ( v1 , v2 ) {
@@ -84,26 +84,26 @@ jQuery.migrateIsPatchEnabled = function( patchCode ) {
84
84
85
85
( function ( ) {
86
86
87
- // Support: IE9 only
88
- // IE9 only creates console object when dev tools are first opened
89
- // IE9 console is a host object, callable but doesn't have .apply()
90
- if ( ! window . console || ! window . console . log ) {
91
- return ;
92
- }
87
+ // Support: IE9 only
88
+ // IE9 only creates console object when dev tools are first opened
89
+ // IE9 console is a host object, callable but doesn't have .apply()
90
+ if ( ! window . console || ! window . console . log ) {
91
+ return ;
92
+ }
93
93
94
- // Need jQuery 3.x-4.x and no older Migrate loaded
95
- if ( ! jQuery || ! jQueryVersionSince ( "3.0.0" ) ||
96
- jQueryVersionSince ( "5.0.0" ) ) {
97
- window . console . log ( "JQMIGRATE: jQuery 3.x-4.x REQUIRED" ) ;
98
- }
99
- if ( jQuery . migrateWarnings ) {
100
- window . console . log ( "JQMIGRATE: Migrate plugin loaded multiple times" ) ;
101
- }
94
+ // Need jQuery 3.x-4.x and no older Migrate loaded
95
+ if ( ! jQuery || ! jQueryVersionSince ( "3.0.0" ) ||
96
+ jQueryVersionSince ( "5.0.0" ) ) {
97
+ window . console . log ( "JQMIGRATE: jQuery 3.x-4.x REQUIRED" ) ;
98
+ }
99
+ if ( jQuery . migrateWarnings ) {
100
+ window . console . log ( "JQMIGRATE: Migrate plugin loaded multiple times" ) ;
101
+ }
102
102
103
- // Show a message on the console so devs know we're active
104
- window . console . log ( "JQMIGRATE: Migrate is installed" +
105
- ( jQuery . migrateMute ? "" : " with logging active" ) +
106
- ", version " + jQuery . migrateVersion ) ;
103
+ // Show a message on the console so devs know we're active
104
+ window . console . log ( "JQMIGRATE: Migrate is installed" +
105
+ ( jQuery . migrateMute ? "" : " with logging active" ) +
106
+ ", version " + jQuery . migrateVersion ) ;
107
107
108
108
} ) ( ) ;
109
109
@@ -320,7 +320,8 @@ if ( jQueryVersionSince( "3.2.0" ) ) {
320
320
321
321
if ( jQueryVersionSince ( "3.3.0" ) ) {
322
322
323
- migratePatchAndWarnFunc ( jQuery , "isNumeric" , function ( obj ) {
323
+ migratePatchAndWarnFunc ( jQuery , "isNumeric" ,
324
+ function ( obj ) {
324
325
325
326
// As of jQuery 3.0, isNumeric is limited to
326
327
// strings and numbers (primitives or objects)
@@ -417,14 +418,15 @@ if ( !jQueryVersionSince( "4.0.0" ) ) {
417
418
418
419
var oldRemoveAttr = jQuery . fn . removeAttr ,
419
420
oldToggleClass = jQuery . fn . toggleClass ,
421
+ rbooleans = / ^ (?: c h e c k e d | s e l e c t e d | a s y n c | a u t o f o c u s | a u t o p l a y | c o n t r o l s | d e f e r | d i s a b l e d | h i d d e n | i s m a p | l o o p | m u l t i p l e | o p e n | r e a d o n l y | r e q u i r e d | s c o p e d ) $ / i,
420
422
rmatchNonSpace = / \S + / g;
421
423
422
424
migratePatchFunc ( jQuery . fn , "removeAttr" , function ( name ) {
423
425
var self = this ,
424
426
patchNeeded = false ;
425
427
426
428
jQuery . each ( name . match ( rmatchNonSpace ) , function ( _i , attr ) {
427
- if ( jQuery . expr . match . bool . test ( attr ) ) {
429
+ if ( rbooleans . test ( attr ) ) {
428
430
429
431
// Only warn if at least a single node had the property set to
430
432
// something else than `false`. Otherwise, this Migrate patch
@@ -472,8 +474,8 @@ migratePatchFunc( jQuery.fn, "toggleClass", function( state ) {
472
474
if ( this . setAttribute ) {
473
475
this . setAttribute ( "class" ,
474
476
className || state === false ?
475
- "" :
476
- jQuery . data ( this , "__className__" ) || ""
477
+ "" :
478
+ jQuery . data ( this , "__className__" ) || ""
477
479
) ;
478
480
}
479
481
} ) ;
@@ -564,7 +566,7 @@ if ( jQueryVersionSince( "3.4.0" ) && typeof Proxy !== "undefined" ) {
564
566
}
565
567
566
568
// In jQuery >=4 where jQuery.cssNumber is missing fill it with the latest 3.x version:
567
- // https://github.com/jquery/jquery/blob/3.6.0 /src/css.js#L212-L233
569
+ // https://github.com/jquery/jquery/blob/3.7.1 /src/css.js#L216-L246
568
570
// This way, number values for the CSS properties below won't start triggering
569
571
// Migrate warnings when jQuery gets updated to >=4.0.0 (gh-438).
570
572
if ( jQueryVersionSince ( "4.0.0" ) ) {
@@ -573,8 +575,9 @@ if ( jQueryVersionSince( "4.0.0" ) ) {
573
575
// in a `jQuery.fn.css` patch and this usage shouldn't warn.
574
576
internalCssNumber = {
575
577
animationIterationCount : true ,
578
+ aspectRatio : true ,
579
+ borderImageSlice : true ,
576
580
columnCount : true ,
577
- fillOpacity : true ,
578
581
flexGrow : true ,
579
582
flexShrink : true ,
580
583
fontWeight : true ,
@@ -589,9 +592,17 @@ if ( jQueryVersionSince( "4.0.0" ) ) {
589
592
opacity : true ,
590
593
order : true ,
591
594
orphans : true ,
595
+ scale : true ,
592
596
widows : true ,
593
597
zIndex : true ,
594
- zoom : true
598
+ zoom : true ,
599
+
600
+ // SVG-related
601
+ fillOpacity : true ,
602
+ floodOpacity : true ,
603
+ stopOpacity : true ,
604
+ strokeMiterlimit : true ,
605
+ strokeOpacity : true
595
606
} ;
596
607
597
608
if ( typeof Proxy !== "undefined" ) {
@@ -837,16 +848,16 @@ jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
837
848
jQuery . each ( ( "blur focus focusin focusout resize scroll click dblclick " +
838
849
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
839
850
"change select submit keydown keypress keyup contextmenu" ) . split ( " " ) ,
840
- function ( _i , name ) {
851
+ function ( _i , name ) {
841
852
842
853
// Handle event binding
843
854
migratePatchAndWarnFunc ( jQuery . fn , name , function ( data , fn ) {
844
855
return arguments . length > 0 ?
845
856
this . on ( name , null , data , fn ) :
846
857
this . trigger ( name ) ;
847
- } ,
848
- "shorthand-deprecated-v3" ,
849
- "jQuery.fn." + name + "() event shorthand is deprecated" ) ;
858
+ } ,
859
+ "shorthand-deprecated-v3" ,
860
+ "jQuery.fn." + name + "() event shorthand is deprecated" ) ;
850
861
} ) ;
851
862
852
863
// Trigger "ready" event only once, on document ready
@@ -898,9 +909,11 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\
898
909
* Deprecated, please use `jQuery.migrateDisablePatches( "self-closed-tags" )` instead.
899
910
* @deprecated
900
911
*/
901
- jQuery . UNSAFE_restoreLegacyHtmlPrefilter = function ( ) {
912
+ migratePatchAndWarnFunc ( jQuery , "UNSAFE_restoreLegacyHtmlPrefilter" , function ( ) {
902
913
jQuery . migrateEnablePatches ( "self-closed-tags" ) ;
903
- } ;
914
+ } , "legacy-self-closed-tags" ,
915
+ "jQuery.UNSAFE_restoreLegacyHtmlPrefilter deprecated; use " +
916
+ "`jQuery.migrateEnablePatches( \"self-closed-tags\" )`" ) ;
904
917
905
918
migratePatchFunc ( jQuery , "htmlPrefilter" , function ( html ) {
906
919
warnIfChanged ( html ) ;
0 commit comments