99 * Released under the MIT license
1010 * https://jquery.org/license
1111 *
12- * Date: 2019-04-19T06:52Z
12+ * Date: 2025-01-28T12:40Z
1313 */
1414( function ( global , factory ) {
1515
@@ -4676,11 +4676,40 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
46764676
46774677
46784678
4679- // We have to close these tags to support XHTML (#13200)
4680- var wrapMap = {
4679+ ( function ( ) {
4680+ var fragment = document . createDocumentFragment ( ) ,
4681+ div = fragment . appendChild ( document . createElement ( "div" ) ) ,
4682+ input = document . createElement ( "input" ) ;
4683+
4684+ // Support: Android 4.0 - 4.3 only
4685+ // Check state lost if the name is set (#11217)
4686+ // Support: Windows Web Apps (WWA)
4687+ // `name` and `type` must use .setAttribute for WWA (#14901)
4688+ input . setAttribute ( "type" , "radio" ) ;
4689+ input . setAttribute ( "checked" , "checked" ) ;
4690+ input . setAttribute ( "name" , "t" ) ;
4691+
4692+ div . appendChild ( input ) ;
4693+
4694+ // Support: Android <=4.1 only
4695+ // Older WebKit doesn't clone checked state correctly in fragments
4696+ support . checkClone = div . cloneNode ( true ) . cloneNode ( true ) . lastChild . checked ;
4697+
4698+ // Support: IE <=11 only
4699+ // Make sure textarea (and checkbox) defaultValue is properly cloned
4700+ div . innerHTML = "<textarea>x</textarea>" ;
4701+ support . noCloneChecked = ! ! div . cloneNode ( true ) . lastChild . defaultValue ;
46814702
46824703 // Support: IE <=9 only
4683- option : [ 1 , "<select multiple='multiple'>" , "</select>" ] ,
4704+ // IE <=9 replaces <option> tags with their contents when inserted outside of
4705+ // the select element.
4706+ div . innerHTML = "<option></option>" ;
4707+ support . option = ! ! div . lastChild ;
4708+ } ) ( ) ;
4709+
4710+
4711+ // We have to close these tags to support XHTML (#13200)
4712+ var wrapMap = {
46844713
46854714 // XHTML parsers do not magically insert elements in the
46864715 // same way that tag soup parsers do. So we cannot shorten
@@ -4693,12 +4722,14 @@ var wrapMap = {
46934722 _default : [ 0 , "" , "" ]
46944723} ;
46954724
4696- // Support: IE <=9 only
4697- wrapMap . optgroup = wrapMap . option ;
4698-
46994725wrapMap . tbody = wrapMap . tfoot = wrapMap . colgroup = wrapMap . caption = wrapMap . thead ;
47004726wrapMap . th = wrapMap . td ;
47014727
4728+ // Support: IE <=9 only
4729+ if ( ! support . option ) {
4730+ wrapMap . optgroup = wrapMap . option = [ 1 , "<select multiple='multiple'>" , "</select>" ] ;
4731+ }
4732+
47024733
47034734function getAll ( context , tag ) {
47044735
@@ -4829,32 +4860,6 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
48294860
48304861 return fragment ;
48314862}
4832-
4833-
4834- ( function ( ) {
4835- var fragment = document . createDocumentFragment ( ) ,
4836- div = fragment . appendChild ( document . createElement ( "div" ) ) ,
4837- input = document . createElement ( "input" ) ;
4838-
4839- // Support: Android 4.0 - 4.3 only
4840- // Check state lost if the name is set (#11217)
4841- // Support: Windows Web Apps (WWA)
4842- // `name` and `type` must use .setAttribute for WWA (#14901)
4843- input . setAttribute ( "type" , "radio" ) ;
4844- input . setAttribute ( "checked" , "checked" ) ;
4845- input . setAttribute ( "name" , "t" ) ;
4846-
4847- div . appendChild ( input ) ;
4848-
4849- // Support: Android <=4.1 only
4850- // Older WebKit doesn't clone checked state correctly in fragments
4851- support . checkClone = div . cloneNode ( true ) . cloneNode ( true ) . lastChild . checked ;
4852-
4853- // Support: IE <=11 only
4854- // Make sure textarea (and checkbox) defaultValue is properly cloned
4855- div . innerHTML = "<textarea>x</textarea>" ;
4856- support . noCloneChecked = ! ! div . cloneNode ( true ) . lastChild . defaultValue ;
4857- } ) ( ) ;
48584863var documentElement = document . documentElement ;
48594864
48604865
@@ -5591,13 +5596,6 @@ jQuery.fn.extend( {
55915596
55925597var
55935598
5594- /* eslint-disable max-len */
5595-
5596- // See https://github.com/eslint/eslint/issues/3229
5597- rxhtmlTag = / < (? ! a r e a | b r | c o l | e m b e d | h r | i m g | i n p u t | l i n k | m e t a | p a r a m ) ( ( [ a - z ] [ ^ \/ \0 > \x20 \t \r \n \f ] * ) [ ^ > ] * ) \/ > / gi,
5598-
5599- /* eslint-enable */
5600-
56015599 // Support: IE <=10 - 11, Edge 12 - 13 only
56025600 // In IE/Edge using regex groups here causes severe slowdowns.
56035601 // See https://connect.microsoft.com/IE/feedback/details/1736512/
@@ -5794,7 +5792,7 @@ function remove( elem, selector, keepData ) {
57945792
57955793jQuery . extend ( {
57965794 htmlPrefilter : function ( html ) {
5797- return html . replace ( rxhtmlTag , "<$1></$2>" ) ;
5795+ return html ;
57985796 } ,
57995797
58005798 clone : function ( elem , dataAndEvents , deepDataAndEvents ) {
0 commit comments