jquery-rails 4.3.3 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jquery-rails might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -1
- data/VERSIONS.md +1 -0
- data/lib/jquery/assert_select.rb +1 -1
- data/lib/jquery/rails/version.rb +2 -2
- data/test/assert_select_jquery_test.rb +5 -0
- data/vendor/assets/javascripts/jquery3.js +405 -181
- data/vendor/assets/javascripts/jquery3.min.js +2 -2
- data/vendor/assets/javascripts/jquery3.min.map +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b52a193e419a4e8a0da353faf40d8d66705bdf64171fb6c800b637119541ac9
|
4
|
+
data.tar.gz: f44fd79c6c3ce8d0b40892f71bd9ec5f570ed56c01c9396281d4909f8ce48d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7c4027d93c8fba8669eadf6b469d83f85252e225b2d1d9ccbd6f254785b8c44fdc31bf67ad278305e776df0868149324bd2745df26396d48e74260992630493
|
7
|
+
data.tar.gz: ea65dae08a0209aa928eb0196768d7a8811b5be9757dda5289c9505420f6b7cfb8795f1e0da2090198c2bd0be54c3b019561ed775d0f9b6848cb43d8c8f6e835
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -24,6 +24,12 @@ versions of jQuery.
|
|
24
24
|
|
25
25
|
## Installation
|
26
26
|
|
27
|
+
Add
|
28
|
+
```
|
29
|
+
gem 'jquery-rails'
|
30
|
+
```
|
31
|
+
to your Gemfile.
|
32
|
+
|
27
33
|
The jquery and jquery-ujs files will be added to the asset pipeline and available for you to use. If they're not already in `app/assets/javascripts/application.js` by default, add these lines:
|
28
34
|
|
29
35
|
```js
|
@@ -72,4 +78,4 @@ jquery-rails is released under the [MIT License](MIT-LICENSE).
|
|
72
78
|
|
73
79
|
## Acknowledgements
|
74
80
|
|
75
|
-
Many thanks are due to all of [the jquery-rails contributors](https://github.com/rails/jquery-rails/graphs/contributors). Special thanks to [JangoSteve](http://github.com/JangoSteve) for tirelessly answering questions and accepting patches, and the [Rails Core Team](https://github.com/
|
81
|
+
Many thanks are due to all of [the jquery-rails contributors](https://github.com/rails/jquery-rails/graphs/contributors). Special thanks to [JangoSteve](http://github.com/JangoSteve) for tirelessly answering questions and accepting patches, and the [Rails Core Team](https://github.com/orgs/rails/people) for making jquery-rails an official part of Rails 3.1.
|
data/VERSIONS.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
| Gem | jQuery | jQuery UJS | jQuery UI |
|
4
4
|
|--------|--------|------------| ----------|
|
5
|
+
| 4.3.4 | 1.12.4 & 2.2.4 & 3.4.0 | 1.2.2 | - |
|
5
6
|
| 4.3.3 | 1.12.4 & 2.2.4 & 3.3.1 | 1.2.2 | - |
|
6
7
|
| 4.3.2 | 1.12.4 & 2.2.4 & 3.3.0 | 1.2.2 | - |
|
7
8
|
| 4.3.1 | 1.12.4 & 2.2.4 & 3.2.1 | 1.2.2 | - |
|
data/lib/jquery/assert_select.rb
CHANGED
@@ -49,7 +49,7 @@ module Rails::Dom::Testing::Assertions::SelectorAssertions
|
|
49
49
|
|
50
50
|
PATTERN_HTML = "['\"]((\\\\\"|\\\\'|[^\"'])*)['\"]"
|
51
51
|
PATTERN_UNICODE_ESCAPED_CHAR = /\\u([0-9a-zA-Z]{4})/
|
52
|
-
SKELETAL_PATTERN = "(?:jQuery|\\$)\\(%s\\)\\.%s\\(%s\\);"
|
52
|
+
SKELETAL_PATTERN = "(?:jQuery|\\$)\\(%s\\)\\.%s\\(%s\\)[;]?"
|
53
53
|
|
54
54
|
def assert_select_jquery(*args, &block)
|
55
55
|
jquery_method = args.first.is_a?(Symbol) ? args.shift : nil
|
data/lib/jquery/rails/version.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'ostruct'
|
1
2
|
require_relative 'test_helper'
|
2
3
|
require_relative '../lib/jquery/assert_select'
|
3
4
|
|
@@ -19,6 +20,9 @@ class AssertSelectJQueryTest < ActiveSupport::TestCase
|
|
19
20
|
$("#cart tr:not(.total_line) > *").remove();
|
20
21
|
$("[href|=\"val\"][href$=\"val\"][href^=\"val\"]").remove();
|
21
22
|
$("tr + td, li").remove();
|
23
|
+
|
24
|
+
// without semicolon
|
25
|
+
$("#browser_cart").hide("blind", 1000)
|
22
26
|
JS
|
23
27
|
|
24
28
|
setup do
|
@@ -28,6 +32,7 @@ class AssertSelectJQueryTest < ActiveSupport::TestCase
|
|
28
32
|
def test_target_as_receiver
|
29
33
|
assert_nothing_raised do
|
30
34
|
assert_select_jquery :show, :blind, '#card'
|
35
|
+
assert_select_jquery :hide, :blind, '#browser_cart'
|
31
36
|
assert_select_jquery :html, '#id' do
|
32
37
|
assert_select 'p', 'something'
|
33
38
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v3.
|
2
|
+
* jQuery JavaScript Library v3.4.0
|
3
3
|
* https://jquery.com/
|
4
4
|
*
|
5
5
|
* Includes Sizzle.js
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* Released under the MIT license
|
10
10
|
* https://jquery.org/license
|
11
11
|
*
|
12
|
-
* Date:
|
12
|
+
* Date: 2019-04-10T19:48Z
|
13
13
|
*/
|
14
14
|
( function( global, factory ) {
|
15
15
|
|
@@ -91,20 +91,33 @@ var isWindow = function isWindow( obj ) {
|
|
91
91
|
var preservedScriptAttributes = {
|
92
92
|
type: true,
|
93
93
|
src: true,
|
94
|
+
nonce: true,
|
94
95
|
noModule: true
|
95
96
|
};
|
96
97
|
|
97
|
-
function DOMEval( code,
|
98
|
+
function DOMEval( code, node, doc ) {
|
98
99
|
doc = doc || document;
|
99
100
|
|
100
|
-
var i,
|
101
|
+
var i, val,
|
101
102
|
script = doc.createElement( "script" );
|
102
103
|
|
103
104
|
script.text = code;
|
104
105
|
if ( node ) {
|
105
106
|
for ( i in preservedScriptAttributes ) {
|
106
|
-
|
107
|
-
|
107
|
+
|
108
|
+
// Support: Firefox 64+, Edge 18+
|
109
|
+
// Some browsers don't support the "nonce" property on scripts.
|
110
|
+
// On the other hand, just using `getAttribute` is not enough as
|
111
|
+
// the `nonce` attribute is reset to an empty string whenever it
|
112
|
+
// becomes browsing-context connected.
|
113
|
+
// See https://github.com/whatwg/html/issues/2369
|
114
|
+
// See https://html.spec.whatwg.org/#nonce-attributes
|
115
|
+
// The `node.getAttribute` check was added for the sake of
|
116
|
+
// `jQuery.globalEval` so that it can fake a nonce-containing node
|
117
|
+
// via an object.
|
118
|
+
val = node[ i ] || node.getAttribute && node.getAttribute( i );
|
119
|
+
if ( val ) {
|
120
|
+
script.setAttribute( i, val );
|
108
121
|
}
|
109
122
|
}
|
110
123
|
}
|
@@ -129,7 +142,7 @@ function toType( obj ) {
|
|
129
142
|
|
130
143
|
|
131
144
|
var
|
132
|
-
version = "3.
|
145
|
+
version = "3.4.0",
|
133
146
|
|
134
147
|
// Define a local copy of jQuery
|
135
148
|
jQuery = function( selector, context ) {
|
@@ -258,25 +271,28 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|
258
271
|
|
259
272
|
// Extend the base object
|
260
273
|
for ( name in options ) {
|
261
|
-
src = target[ name ];
|
262
274
|
copy = options[ name ];
|
263
275
|
|
276
|
+
// Prevent Object.prototype pollution
|
264
277
|
// Prevent never-ending loop
|
265
|
-
if ( target === copy ) {
|
278
|
+
if ( name === "__proto__" || target === copy ) {
|
266
279
|
continue;
|
267
280
|
}
|
268
281
|
|
269
282
|
// Recurse if we're merging plain objects or arrays
|
270
283
|
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
271
284
|
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
285
|
+
src = target[ name ];
|
272
286
|
|
273
|
-
|
274
|
-
|
275
|
-
clone =
|
276
|
-
|
287
|
+
// Ensure proper type for the source value
|
288
|
+
if ( copyIsArray && !Array.isArray( src ) ) {
|
289
|
+
clone = [];
|
290
|
+
} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
|
291
|
+
clone = {};
|
277
292
|
} else {
|
278
|
-
clone = src
|
293
|
+
clone = src;
|
279
294
|
}
|
295
|
+
copyIsArray = false;
|
280
296
|
|
281
297
|
// Never move original objects, clone them
|
282
298
|
target[ name ] = jQuery.extend( deep, clone, copy );
|
@@ -329,9 +345,6 @@ jQuery.extend( {
|
|
329
345
|
},
|
330
346
|
|
331
347
|
isEmptyObject: function( obj ) {
|
332
|
-
|
333
|
-
/* eslint-disable no-unused-vars */
|
334
|
-
// See https://github.com/eslint/eslint/issues/6125
|
335
348
|
var name;
|
336
349
|
|
337
350
|
for ( name in obj ) {
|
@@ -341,8 +354,8 @@ jQuery.extend( {
|
|
341
354
|
},
|
342
355
|
|
343
356
|
// Evaluates a script in a global context
|
344
|
-
globalEval: function( code ) {
|
345
|
-
DOMEval( code );
|
357
|
+
globalEval: function( code, options ) {
|
358
|
+
DOMEval( code, { nonce: options && options.nonce } );
|
346
359
|
},
|
347
360
|
|
348
361
|
each: function( obj, callback ) {
|
@@ -498,14 +511,14 @@ function isArrayLike( obj ) {
|
|
498
511
|
}
|
499
512
|
var Sizzle =
|
500
513
|
/*!
|
501
|
-
* Sizzle CSS Selector Engine v2.3.
|
514
|
+
* Sizzle CSS Selector Engine v2.3.4
|
502
515
|
* https://sizzlejs.com/
|
503
516
|
*
|
504
|
-
* Copyright
|
517
|
+
* Copyright JS Foundation and other contributors
|
505
518
|
* Released under the MIT license
|
506
|
-
*
|
519
|
+
* https://js.foundation/
|
507
520
|
*
|
508
|
-
* Date:
|
521
|
+
* Date: 2019-04-08
|
509
522
|
*/
|
510
523
|
(function( window ) {
|
511
524
|
|
@@ -539,6 +552,7 @@ var i,
|
|
539
552
|
classCache = createCache(),
|
540
553
|
tokenCache = createCache(),
|
541
554
|
compilerCache = createCache(),
|
555
|
+
nonnativeSelectorCache = createCache(),
|
542
556
|
sortOrder = function( a, b ) {
|
543
557
|
if ( a === b ) {
|
544
558
|
hasDuplicate = true;
|
@@ -600,8 +614,7 @@ var i,
|
|
600
614
|
|
601
615
|
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
602
616
|
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
|
603
|
-
|
604
|
-
rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
|
617
|
+
rdescend = new RegExp( whitespace + "|>" ),
|
605
618
|
|
606
619
|
rpseudo = new RegExp( pseudos ),
|
607
620
|
ridentifier = new RegExp( "^" + identifier + "$" ),
|
@@ -622,6 +635,7 @@ var i,
|
|
622
635
|
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
623
636
|
},
|
624
637
|
|
638
|
+
rhtml = /HTML$/i,
|
625
639
|
rinputs = /^(?:input|select|textarea|button)$/i,
|
626
640
|
rheader = /^h\d$/i,
|
627
641
|
|
@@ -676,9 +690,9 @@ var i,
|
|
676
690
|
setDocument();
|
677
691
|
},
|
678
692
|
|
679
|
-
|
693
|
+
inDisabledFieldset = addCombinator(
|
680
694
|
function( elem ) {
|
681
|
-
return elem.disabled === true && (
|
695
|
+
return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
|
682
696
|
},
|
683
697
|
{ dir: "parentNode", next: "legend" }
|
684
698
|
);
|
@@ -791,18 +805,22 @@ function Sizzle( selector, context, results, seed ) {
|
|
791
805
|
|
792
806
|
// Take advantage of querySelectorAll
|
793
807
|
if ( support.qsa &&
|
794
|
-
!
|
795
|
-
(!rbuggyQSA || !rbuggyQSA.test( selector ))
|
796
|
-
|
797
|
-
if ( nodeType !== 1 ) {
|
798
|
-
newContext = context;
|
799
|
-
newSelector = selector;
|
808
|
+
!nonnativeSelectorCache[ selector + " " ] &&
|
809
|
+
(!rbuggyQSA || !rbuggyQSA.test( selector )) &&
|
800
810
|
|
801
|
-
//
|
802
|
-
// Thanks to Andrew Dupont for this workaround technique
|
803
|
-
// Support: IE <=8
|
811
|
+
// Support: IE 8 only
|
804
812
|
// Exclude object elements
|
805
|
-
|
813
|
+
(nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) {
|
814
|
+
|
815
|
+
newSelector = selector;
|
816
|
+
newContext = context;
|
817
|
+
|
818
|
+
// qSA considers elements outside a scoping root when evaluating child or
|
819
|
+
// descendant combinators, which is not what we want.
|
820
|
+
// In such cases, we work around the behavior by prefixing every selector in the
|
821
|
+
// list with an ID selector referencing the scope context.
|
822
|
+
// Thanks to Andrew Dupont for this technique.
|
823
|
+
if ( nodeType === 1 && rdescend.test( selector ) ) {
|
806
824
|
|
807
825
|
// Capture the context ID, setting it first if necessary
|
808
826
|
if ( (nid = context.getAttribute( "id" )) ) {
|
@@ -824,17 +842,16 @@ function Sizzle( selector, context, results, seed ) {
|
|
824
842
|
context;
|
825
843
|
}
|
826
844
|
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
}
|
845
|
+
try {
|
846
|
+
push.apply( results,
|
847
|
+
newContext.querySelectorAll( newSelector )
|
848
|
+
);
|
849
|
+
return results;
|
850
|
+
} catch ( qsaError ) {
|
851
|
+
nonnativeSelectorCache( selector, true );
|
852
|
+
} finally {
|
853
|
+
if ( nid === expando ) {
|
854
|
+
context.removeAttribute( "id" );
|
838
855
|
}
|
839
856
|
}
|
840
857
|
}
|
@@ -998,7 +1015,7 @@ function createDisabledPseudo( disabled ) {
|
|
998
1015
|
// Where there is no isDisabled, check manually
|
999
1016
|
/* jshint -W018 */
|
1000
1017
|
elem.isDisabled !== !disabled &&
|
1001
|
-
|
1018
|
+
inDisabledFieldset( elem ) === disabled;
|
1002
1019
|
}
|
1003
1020
|
|
1004
1021
|
return elem.disabled === disabled;
|
@@ -1055,10 +1072,13 @@ support = Sizzle.support = {};
|
|
1055
1072
|
* @returns {Boolean} True iff elem is a non-HTML XML node
|
1056
1073
|
*/
|
1057
1074
|
isXML = Sizzle.isXML = function( elem ) {
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1075
|
+
var namespace = elem.namespaceURI,
|
1076
|
+
docElem = (elem.ownerDocument || elem).documentElement;
|
1077
|
+
|
1078
|
+
// Support: IE <=8
|
1079
|
+
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
1080
|
+
// https://bugs.jquery.com/ticket/4833
|
1081
|
+
return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
|
1062
1082
|
};
|
1063
1083
|
|
1064
1084
|
/**
|
@@ -1480,11 +1500,8 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
1480
1500
|
setDocument( elem );
|
1481
1501
|
}
|
1482
1502
|
|
1483
|
-
// Make sure that attribute selectors are quoted
|
1484
|
-
expr = expr.replace( rattributeQuotes, "='$1']" );
|
1485
|
-
|
1486
1503
|
if ( support.matchesSelector && documentIsHTML &&
|
1487
|
-
!
|
1504
|
+
!nonnativeSelectorCache[ expr + " " ] &&
|
1488
1505
|
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
|
1489
1506
|
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
1490
1507
|
|
@@ -1498,7 +1515,9 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
1498
1515
|
elem.document && elem.document.nodeType !== 11 ) {
|
1499
1516
|
return ret;
|
1500
1517
|
}
|
1501
|
-
} catch (e) {
|
1518
|
+
} catch (e) {
|
1519
|
+
nonnativeSelectorCache( expr, true );
|
1520
|
+
}
|
1502
1521
|
}
|
1503
1522
|
|
1504
1523
|
return Sizzle( expr, document, null, [ elem ] ).length > 0;
|
@@ -1957,7 +1976,7 @@ Expr = Sizzle.selectors = {
|
|
1957
1976
|
"contains": markFunction(function( text ) {
|
1958
1977
|
text = text.replace( runescape, funescape );
|
1959
1978
|
return function( elem ) {
|
1960
|
-
return ( elem.textContent ||
|
1979
|
+
return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
|
1961
1980
|
};
|
1962
1981
|
}),
|
1963
1982
|
|
@@ -2096,7 +2115,11 @@ Expr = Sizzle.selectors = {
|
|
2096
2115
|
}),
|
2097
2116
|
|
2098
2117
|
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2099
|
-
var i = argument < 0 ?
|
2118
|
+
var i = argument < 0 ?
|
2119
|
+
argument + length :
|
2120
|
+
argument > length ?
|
2121
|
+
length :
|
2122
|
+
argument;
|
2100
2123
|
for ( ; --i >= 0; ) {
|
2101
2124
|
matchIndexes.push( i );
|
2102
2125
|
}
|
@@ -3146,18 +3169,18 @@ jQuery.each( {
|
|
3146
3169
|
return siblings( elem.firstChild );
|
3147
3170
|
},
|
3148
3171
|
contents: function( elem ) {
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3172
|
+
if ( typeof elem.contentDocument !== "undefined" ) {
|
3173
|
+
return elem.contentDocument;
|
3174
|
+
}
|
3152
3175
|
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
|
3176
|
+
// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
|
3177
|
+
// Treat the template element as a regular one in browsers that
|
3178
|
+
// don't support it.
|
3179
|
+
if ( nodeName( elem, "template" ) ) {
|
3180
|
+
elem = elem.content || elem;
|
3181
|
+
}
|
3159
3182
|
|
3160
|
-
|
3183
|
+
return jQuery.merge( [], elem.childNodes );
|
3161
3184
|
}
|
3162
3185
|
}, function( name, fn ) {
|
3163
3186
|
jQuery.fn[ name ] = function( until, selector ) {
|
@@ -4466,6 +4489,22 @@ var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
|
|
4466
4489
|
|
4467
4490
|
var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
|
4468
4491
|
|
4492
|
+
var documentElement = document.documentElement;
|
4493
|
+
|
4494
|
+
|
4495
|
+
|
4496
|
+
var isAttached = function( elem ) {
|
4497
|
+
return jQuery.contains( elem.ownerDocument, elem );
|
4498
|
+
},
|
4499
|
+
composed = { composed: true };
|
4500
|
+
|
4501
|
+
// Check attachment across shadow DOM boundaries when possible (gh-3504)
|
4502
|
+
if ( documentElement.attachShadow ) {
|
4503
|
+
isAttached = function( elem ) {
|
4504
|
+
return jQuery.contains( elem.ownerDocument, elem ) ||
|
4505
|
+
elem.getRootNode( composed ) === elem.ownerDocument;
|
4506
|
+
};
|
4507
|
+
}
|
4469
4508
|
var isHiddenWithinTree = function( elem, el ) {
|
4470
4509
|
|
4471
4510
|
// isHiddenWithinTree might be called from jQuery#filter function;
|
@@ -4480,7 +4519,7 @@ var isHiddenWithinTree = function( elem, el ) {
|
|
4480
4519
|
// Support: Firefox <=43 - 45
|
4481
4520
|
// Disconnected elements can have computed display: none, so first confirm that elem is
|
4482
4521
|
// in the document.
|
4483
|
-
|
4522
|
+
isAttached( elem ) &&
|
4484
4523
|
|
4485
4524
|
jQuery.css( elem, "display" ) === "none";
|
4486
4525
|
};
|
@@ -4522,7 +4561,8 @@ function adjustCSS( elem, prop, valueParts, tween ) {
|
|
4522
4561
|
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
4523
4562
|
|
4524
4563
|
// Starting value computation is required for potential unit mismatches
|
4525
|
-
initialInUnit =
|
4564
|
+
initialInUnit = elem.nodeType &&
|
4565
|
+
( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
|
4526
4566
|
rcssNum.exec( jQuery.css( elem, prop ) );
|
4527
4567
|
|
4528
4568
|
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
|
@@ -4669,7 +4709,7 @@ jQuery.fn.extend( {
|
|
4669
4709
|
} );
|
4670
4710
|
var rcheckableType = ( /^(?:checkbox|radio)$/i );
|
4671
4711
|
|
4672
|
-
var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]
|
4712
|
+
var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
|
4673
4713
|
|
4674
4714
|
var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
|
4675
4715
|
|
@@ -4741,7 +4781,7 @@ function setGlobalEval( elems, refElements ) {
|
|
4741
4781
|
var rhtml = /<|&#?\w+;/;
|
4742
4782
|
|
4743
4783
|
function buildFragment( elems, context, scripts, selection, ignored ) {
|
4744
|
-
var elem, tmp, tag, wrap,
|
4784
|
+
var elem, tmp, tag, wrap, attached, j,
|
4745
4785
|
fragment = context.createDocumentFragment(),
|
4746
4786
|
nodes = [],
|
4747
4787
|
i = 0,
|
@@ -4805,13 +4845,13 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|
4805
4845
|
continue;
|
4806
4846
|
}
|
4807
4847
|
|
4808
|
-
|
4848
|
+
attached = isAttached( elem );
|
4809
4849
|
|
4810
4850
|
// Append to fragment
|
4811
4851
|
tmp = getAll( fragment.appendChild( elem ), "script" );
|
4812
4852
|
|
4813
4853
|
// Preserve script evaluation history
|
4814
|
-
if (
|
4854
|
+
if ( attached ) {
|
4815
4855
|
setGlobalEval( tmp );
|
4816
4856
|
}
|
4817
4857
|
|
@@ -4854,8 +4894,6 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|
4854
4894
|
div.innerHTML = "<textarea>x</textarea>";
|
4855
4895
|
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
4856
4896
|
} )();
|
4857
|
-
var documentElement = document.documentElement;
|
4858
|
-
|
4859
4897
|
|
4860
4898
|
|
4861
4899
|
var
|
@@ -4871,8 +4909,19 @@ function returnFalse() {
|
|
4871
4909
|
return false;
|
4872
4910
|
}
|
4873
4911
|
|
4912
|
+
// Support: IE <=9 - 11+
|
4913
|
+
// focus() and blur() are asynchronous, except when they are no-op.
|
4914
|
+
// So expect focus to be synchronous when the element is already active,
|
4915
|
+
// and blur to be synchronous when the element is not already active.
|
4916
|
+
// (focus and blur are always synchronous in other supported browsers,
|
4917
|
+
// this just defines when we can count on it).
|
4918
|
+
function expectSync( elem, type ) {
|
4919
|
+
return ( elem === safeActiveElement() ) === ( type === "focus" );
|
4920
|
+
}
|
4921
|
+
|
4874
4922
|
// Support: IE <=9 only
|
4875
|
-
//
|
4923
|
+
// Accessing document.activeElement can throw unexpectedly
|
4924
|
+
// https://bugs.jquery.com/ticket/13393
|
4876
4925
|
function safeActiveElement() {
|
4877
4926
|
try {
|
4878
4927
|
return document.activeElement;
|
@@ -5172,9 +5221,10 @@ jQuery.event = {
|
|
5172
5221
|
while ( ( handleObj = matched.handlers[ j++ ] ) &&
|
5173
5222
|
!event.isImmediatePropagationStopped() ) {
|
5174
5223
|
|
5175
|
-
//
|
5176
|
-
//
|
5177
|
-
if ( !event.rnamespace ||
|
5224
|
+
// If the event is namespaced, then each handler is only invoked if it is
|
5225
|
+
// specially universal or its namespaces are a superset of the event's.
|
5226
|
+
if ( !event.rnamespace || handleObj.namespace === false ||
|
5227
|
+
event.rnamespace.test( handleObj.namespace ) ) {
|
5178
5228
|
|
5179
5229
|
event.handleObj = handleObj;
|
5180
5230
|
event.data = handleObj.data;
|
@@ -5298,39 +5348,53 @@ jQuery.event = {
|
|
5298
5348
|
// Prevent triggered image.load events from bubbling to window.load
|
5299
5349
|
noBubble: true
|
5300
5350
|
},
|
5301
|
-
|
5351
|
+
click: {
|
5302
5352
|
|
5303
|
-
//
|
5304
|
-
|
5305
|
-
|
5306
|
-
|
5307
|
-
|
5308
|
-
|
5309
|
-
|
5310
|
-
|
5311
|
-
|
5312
|
-
|
5313
|
-
|
5314
|
-
|
5315
|
-
|
5316
|
-
|
5353
|
+
// Utilize native event to ensure correct state for checkable inputs
|
5354
|
+
setup: function( data ) {
|
5355
|
+
|
5356
|
+
// For mutual compressibility with _default, replace `this` access with a local var.
|
5357
|
+
// `|| data` is dead code meant only to preserve the variable through minification.
|
5358
|
+
var el = this || data;
|
5359
|
+
|
5360
|
+
// Claim the first handler
|
5361
|
+
if ( rcheckableType.test( el.type ) &&
|
5362
|
+
el.click && nodeName( el, "input" ) &&
|
5363
|
+
dataPriv.get( el, "click" ) === undefined ) {
|
5364
|
+
|
5365
|
+
// dataPriv.set( el, "click", ... )
|
5366
|
+
leverageNative( el, "click", returnTrue );
|
5317
5367
|
}
|
5368
|
+
|
5369
|
+
// Return false to allow normal processing in the caller
|
5370
|
+
return false;
|
5318
5371
|
},
|
5319
|
-
|
5320
|
-
},
|
5321
|
-
click: {
|
5372
|
+
trigger: function( data ) {
|
5322
5373
|
|
5323
|
-
|
5324
|
-
|
5325
|
-
|
5326
|
-
|
5327
|
-
|
5374
|
+
// For mutual compressibility with _default, replace `this` access with a local var.
|
5375
|
+
// `|| data` is dead code meant only to preserve the variable through minification.
|
5376
|
+
var el = this || data;
|
5377
|
+
|
5378
|
+
// Force setup before triggering a click
|
5379
|
+
if ( rcheckableType.test( el.type ) &&
|
5380
|
+
el.click && nodeName( el, "input" ) &&
|
5381
|
+
dataPriv.get( el, "click" ) === undefined ) {
|
5382
|
+
|
5383
|
+
leverageNative( el, "click" );
|
5328
5384
|
}
|
5385
|
+
|
5386
|
+
// Return non-false to allow normal event-path propagation
|
5387
|
+
return true;
|
5329
5388
|
},
|
5330
5389
|
|
5331
|
-
// For cross-browser consistency,
|
5390
|
+
// For cross-browser consistency, suppress native .click() on links
|
5391
|
+
// Also prevent it if we're currently inside a leveraged native-event stack
|
5332
5392
|
_default: function( event ) {
|
5333
|
-
|
5393
|
+
var target = event.target;
|
5394
|
+
return rcheckableType.test( target.type ) &&
|
5395
|
+
target.click && nodeName( target, "input" ) &&
|
5396
|
+
dataPriv.get( target, "click" ) ||
|
5397
|
+
nodeName( target, "a" );
|
5334
5398
|
}
|
5335
5399
|
},
|
5336
5400
|
|
@@ -5347,6 +5411,85 @@ jQuery.event = {
|
|
5347
5411
|
}
|
5348
5412
|
};
|
5349
5413
|
|
5414
|
+
// Ensure the presence of an event listener that handles manually-triggered
|
5415
|
+
// synthetic events by interrupting progress until reinvoked in response to
|
5416
|
+
// *native* events that it fires directly, ensuring that state changes have
|
5417
|
+
// already occurred before other listeners are invoked.
|
5418
|
+
function leverageNative( el, type, expectSync ) {
|
5419
|
+
|
5420
|
+
// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
|
5421
|
+
if ( !expectSync ) {
|
5422
|
+
jQuery.event.add( el, type, returnTrue );
|
5423
|
+
return;
|
5424
|
+
}
|
5425
|
+
|
5426
|
+
// Register the controller as a special universal handler for all event namespaces
|
5427
|
+
dataPriv.set( el, type, false );
|
5428
|
+
jQuery.event.add( el, type, {
|
5429
|
+
namespace: false,
|
5430
|
+
handler: function( event ) {
|
5431
|
+
var notAsync, result,
|
5432
|
+
saved = dataPriv.get( this, type );
|
5433
|
+
|
5434
|
+
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
|
5435
|
+
|
5436
|
+
// Interrupt processing of the outer synthetic .trigger()ed event
|
5437
|
+
if ( !saved ) {
|
5438
|
+
|
5439
|
+
// Store arguments for use when handling the inner native event
|
5440
|
+
saved = slice.call( arguments );
|
5441
|
+
dataPriv.set( this, type, saved );
|
5442
|
+
|
5443
|
+
// Trigger the native event and capture its result
|
5444
|
+
// Support: IE <=9 - 11+
|
5445
|
+
// focus() and blur() are asynchronous
|
5446
|
+
notAsync = expectSync( this, type );
|
5447
|
+
this[ type ]();
|
5448
|
+
result = dataPriv.get( this, type );
|
5449
|
+
if ( saved !== result || notAsync ) {
|
5450
|
+
dataPriv.set( this, type, false );
|
5451
|
+
} else {
|
5452
|
+
result = undefined;
|
5453
|
+
}
|
5454
|
+
if ( saved !== result ) {
|
5455
|
+
|
5456
|
+
// Cancel the outer synthetic event
|
5457
|
+
event.stopImmediatePropagation();
|
5458
|
+
event.preventDefault();
|
5459
|
+
return result;
|
5460
|
+
}
|
5461
|
+
|
5462
|
+
// If this is an inner synthetic event for an event with a bubbling surrogate
|
5463
|
+
// (focus or blur), assume that the surrogate already propagated from triggering the
|
5464
|
+
// native event and prevent that from happening again here.
|
5465
|
+
// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
|
5466
|
+
// bubbling surrogate propagates *after* the non-bubbling base), but that seems
|
5467
|
+
// less bad than duplication.
|
5468
|
+
} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
|
5469
|
+
event.stopPropagation();
|
5470
|
+
}
|
5471
|
+
|
5472
|
+
// If this is a native event triggered above, everything is now in order
|
5473
|
+
// Fire an inner synthetic event with the original arguments
|
5474
|
+
} else if ( saved ) {
|
5475
|
+
|
5476
|
+
// ...and capture the result
|
5477
|
+
dataPriv.set( this, type, jQuery.event.trigger(
|
5478
|
+
|
5479
|
+
// Support: IE <=9 - 11+
|
5480
|
+
// Extend with the prototype to reset the above stopImmediatePropagation()
|
5481
|
+
jQuery.extend( saved.shift(), jQuery.Event.prototype ),
|
5482
|
+
saved,
|
5483
|
+
this
|
5484
|
+
) );
|
5485
|
+
|
5486
|
+
// Abort handling of the native event
|
5487
|
+
event.stopImmediatePropagation();
|
5488
|
+
}
|
5489
|
+
}
|
5490
|
+
} );
|
5491
|
+
}
|
5492
|
+
|
5350
5493
|
jQuery.removeEvent = function( elem, type, handle ) {
|
5351
5494
|
|
5352
5495
|
// This "if" is needed for plain objects
|
@@ -5459,6 +5602,7 @@ jQuery.each( {
|
|
5459
5602
|
shiftKey: true,
|
5460
5603
|
view: true,
|
5461
5604
|
"char": true,
|
5605
|
+
code: true,
|
5462
5606
|
charCode: true,
|
5463
5607
|
key: true,
|
5464
5608
|
keyCode: true,
|
@@ -5505,6 +5649,33 @@ jQuery.each( {
|
|
5505
5649
|
}
|
5506
5650
|
}, jQuery.event.addProp );
|
5507
5651
|
|
5652
|
+
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
5653
|
+
jQuery.event.special[ type ] = {
|
5654
|
+
|
5655
|
+
// Utilize native event if possible so blur/focus sequence is correct
|
5656
|
+
setup: function() {
|
5657
|
+
|
5658
|
+
// Claim the first handler
|
5659
|
+
// dataPriv.set( this, "focus", ... )
|
5660
|
+
// dataPriv.set( this, "blur", ... )
|
5661
|
+
leverageNative( this, type, expectSync );
|
5662
|
+
|
5663
|
+
// Return false to allow normal processing in the caller
|
5664
|
+
return false;
|
5665
|
+
},
|
5666
|
+
trigger: function() {
|
5667
|
+
|
5668
|
+
// Force setup before trigger
|
5669
|
+
leverageNative( this, type );
|
5670
|
+
|
5671
|
+
// Return non-false to allow normal event-path propagation
|
5672
|
+
return true;
|
5673
|
+
},
|
5674
|
+
|
5675
|
+
delegateType: delegateType
|
5676
|
+
};
|
5677
|
+
} );
|
5678
|
+
|
5508
5679
|
// Create mouseenter/leave events using mouseover/out and event-time checks
|
5509
5680
|
// so that event delegation works in jQuery.
|
5510
5681
|
// Do the same for pointerenter/pointerleave and pointerover/pointerout
|
@@ -5755,11 +5926,13 @@ function domManip( collection, args, callback, ignored ) {
|
|
5755
5926
|
if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
|
5756
5927
|
|
5757
5928
|
// Optional AJAX dependency, but won't run scripts if not present
|
5758
|
-
if ( jQuery._evalUrl ) {
|
5759
|
-
jQuery._evalUrl( node.src
|
5929
|
+
if ( jQuery._evalUrl && !node.noModule ) {
|
5930
|
+
jQuery._evalUrl( node.src, {
|
5931
|
+
nonce: node.nonce || node.getAttribute( "nonce" )
|
5932
|
+
} );
|
5760
5933
|
}
|
5761
5934
|
} else {
|
5762
|
-
DOMEval( node.textContent.replace( rcleanScript, "" ),
|
5935
|
+
DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
|
5763
5936
|
}
|
5764
5937
|
}
|
5765
5938
|
}
|
@@ -5781,7 +5954,7 @@ function remove( elem, selector, keepData ) {
|
|
5781
5954
|
}
|
5782
5955
|
|
5783
5956
|
if ( node.parentNode ) {
|
5784
|
-
if ( keepData &&
|
5957
|
+
if ( keepData && isAttached( node ) ) {
|
5785
5958
|
setGlobalEval( getAll( node, "script" ) );
|
5786
5959
|
}
|
5787
5960
|
node.parentNode.removeChild( node );
|
@@ -5799,7 +5972,7 @@ jQuery.extend( {
|
|
5799
5972
|
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
5800
5973
|
var i, l, srcElements, destElements,
|
5801
5974
|
clone = elem.cloneNode( true ),
|
5802
|
-
inPage =
|
5975
|
+
inPage = isAttached( elem );
|
5803
5976
|
|
5804
5977
|
// Fix IE cloning issues
|
5805
5978
|
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
@@ -6095,8 +6268,10 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
6095
6268
|
|
6096
6269
|
// Support: IE 9 only
|
6097
6270
|
// Detect overflow:scroll screwiness (gh-3699)
|
6271
|
+
// Support: Chrome <=64
|
6272
|
+
// Don't get tricked when zoom affects offsetWidth (gh-4029)
|
6098
6273
|
div.style.position = "absolute";
|
6099
|
-
scrollboxSizeVal = div.offsetWidth
|
6274
|
+
scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;
|
6100
6275
|
|
6101
6276
|
documentElement.removeChild( container );
|
6102
6277
|
|
@@ -6167,7 +6342,7 @@ function curCSS( elem, name, computed ) {
|
|
6167
6342
|
if ( computed ) {
|
6168
6343
|
ret = computed.getPropertyValue( name ) || computed[ name ];
|
6169
6344
|
|
6170
|
-
if ( ret === "" && !
|
6345
|
+
if ( ret === "" && !isAttached( elem ) ) {
|
6171
6346
|
ret = jQuery.style( elem, name );
|
6172
6347
|
}
|
6173
6348
|
|
@@ -6223,30 +6398,13 @@ function addGetHookIf( conditionFn, hookFn ) {
|
|
6223
6398
|
}
|
6224
6399
|
|
6225
6400
|
|
6226
|
-
var
|
6401
|
+
var cssPrefixes = [ "Webkit", "Moz", "ms" ],
|
6402
|
+
emptyStyle = document.createElement( "div" ).style,
|
6403
|
+
vendorProps = {};
|
6227
6404
|
|
6228
|
-
|
6229
|
-
// except "table", "table-cell", or "table-caption"
|
6230
|
-
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
6231
|
-
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
6232
|
-
rcustomProp = /^--/,
|
6233
|
-
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
6234
|
-
cssNormalTransform = {
|
6235
|
-
letterSpacing: "0",
|
6236
|
-
fontWeight: "400"
|
6237
|
-
},
|
6238
|
-
|
6239
|
-
cssPrefixes = [ "Webkit", "Moz", "ms" ],
|
6240
|
-
emptyStyle = document.createElement( "div" ).style;
|
6241
|
-
|
6242
|
-
// Return a css property mapped to a potentially vendor prefixed property
|
6405
|
+
// Return a vendor-prefixed property or undefined
|
6243
6406
|
function vendorPropName( name ) {
|
6244
6407
|
|
6245
|
-
// Shortcut for names that are not vendor prefixed
|
6246
|
-
if ( name in emptyStyle ) {
|
6247
|
-
return name;
|
6248
|
-
}
|
6249
|
-
|
6250
6408
|
// Check for vendor prefixed names
|
6251
6409
|
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
6252
6410
|
i = cssPrefixes.length;
|
@@ -6259,16 +6417,33 @@ function vendorPropName( name ) {
|
|
6259
6417
|
}
|
6260
6418
|
}
|
6261
6419
|
|
6262
|
-
// Return a
|
6263
|
-
// a vendor prefixed property.
|
6420
|
+
// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
|
6264
6421
|
function finalPropName( name ) {
|
6265
|
-
var
|
6266
|
-
|
6267
|
-
|
6422
|
+
var final = jQuery.cssProps[ name ] || vendorProps[ name ];
|
6423
|
+
|
6424
|
+
if ( final ) {
|
6425
|
+
return final;
|
6268
6426
|
}
|
6269
|
-
|
6427
|
+
if ( name in emptyStyle ) {
|
6428
|
+
return name;
|
6429
|
+
}
|
6430
|
+
return vendorProps[ name ] = vendorPropName( name ) || name;
|
6270
6431
|
}
|
6271
6432
|
|
6433
|
+
|
6434
|
+
var
|
6435
|
+
|
6436
|
+
// Swappable if display is none or starts with table
|
6437
|
+
// except "table", "table-cell", or "table-caption"
|
6438
|
+
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
6439
|
+
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
6440
|
+
rcustomProp = /^--/,
|
6441
|
+
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
6442
|
+
cssNormalTransform = {
|
6443
|
+
letterSpacing: "0",
|
6444
|
+
fontWeight: "400"
|
6445
|
+
};
|
6446
|
+
|
6272
6447
|
function setPositiveNumber( elem, value, subtract ) {
|
6273
6448
|
|
6274
6449
|
// Any relative (+/-) values have already been
|
@@ -6340,7 +6515,10 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
|
|
6340
6515
|
delta -
|
6341
6516
|
extra -
|
6342
6517
|
0.5
|
6343
|
-
|
6518
|
+
|
6519
|
+
// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
|
6520
|
+
// Use an explicit zero to avoid NaN (gh-3964)
|
6521
|
+
) ) || 0;
|
6344
6522
|
}
|
6345
6523
|
|
6346
6524
|
return delta;
|
@@ -6350,9 +6528,16 @@ function getWidthOrHeight( elem, dimension, extra ) {
|
|
6350
6528
|
|
6351
6529
|
// Start with computed style
|
6352
6530
|
var styles = getStyles( elem ),
|
6531
|
+
|
6532
|
+
// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
|
6533
|
+
// Fake content-box until we know it's needed to know the true value.
|
6534
|
+
boxSizingNeeded = !support.boxSizingReliable() || extra,
|
6535
|
+
isBorderBox = boxSizingNeeded &&
|
6536
|
+
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
6537
|
+
valueIsBorderBox = isBorderBox,
|
6538
|
+
|
6353
6539
|
val = curCSS( elem, dimension, styles ),
|
6354
|
-
|
6355
|
-
valueIsBorderBox = isBorderBox;
|
6540
|
+
offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
|
6356
6541
|
|
6357
6542
|
// Support: Firefox <=54
|
6358
6543
|
// Return a confounding non-pixel value or feign ignorance, as appropriate.
|
@@ -6363,22 +6548,29 @@ function getWidthOrHeight( elem, dimension, extra ) {
|
|
6363
6548
|
val = "auto";
|
6364
6549
|
}
|
6365
6550
|
|
6366
|
-
// Check for style in case a browser which returns unreliable values
|
6367
|
-
// for getComputedStyle silently falls back to the reliable elem.style
|
6368
|
-
valueIsBorderBox = valueIsBorderBox &&
|
6369
|
-
( support.boxSizingReliable() || val === elem.style[ dimension ] );
|
6370
6551
|
|
6371
6552
|
// Fall back to offsetWidth/offsetHeight when value is "auto"
|
6372
6553
|
// This happens for inline elements with no explicit setting (gh-3571)
|
6373
6554
|
// Support: Android <=4.1 - 4.3 only
|
6374
6555
|
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
|
6375
|
-
|
6376
|
-
|
6556
|
+
// Support: IE 9-11 only
|
6557
|
+
// Also use offsetWidth/offsetHeight for when box sizing is unreliable
|
6558
|
+
// We use getClientRects() to check for hidden/disconnected.
|
6559
|
+
// In those cases, the computed value can be trusted to be border-box
|
6560
|
+
if ( ( !support.boxSizingReliable() && isBorderBox ||
|
6561
|
+
val === "auto" ||
|
6562
|
+
!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
|
6563
|
+
elem.getClientRects().length ) {
|
6377
6564
|
|
6378
|
-
|
6565
|
+
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
6379
6566
|
|
6380
|
-
// offsetWidth/offsetHeight
|
6381
|
-
|
6567
|
+
// Where available, offsetWidth/offsetHeight approximate border box dimensions.
|
6568
|
+
// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
|
6569
|
+
// retrieved value as a content box dimension.
|
6570
|
+
valueIsBorderBox = offsetProp in elem;
|
6571
|
+
if ( valueIsBorderBox ) {
|
6572
|
+
val = elem[ offsetProp ];
|
6573
|
+
}
|
6382
6574
|
}
|
6383
6575
|
|
6384
6576
|
// Normalize "" and auto
|
@@ -6424,6 +6616,13 @@ jQuery.extend( {
|
|
6424
6616
|
"flexGrow": true,
|
6425
6617
|
"flexShrink": true,
|
6426
6618
|
"fontWeight": true,
|
6619
|
+
"gridArea": true,
|
6620
|
+
"gridColumn": true,
|
6621
|
+
"gridColumnEnd": true,
|
6622
|
+
"gridColumnStart": true,
|
6623
|
+
"gridRow": true,
|
6624
|
+
"gridRowEnd": true,
|
6625
|
+
"gridRowStart": true,
|
6427
6626
|
"lineHeight": true,
|
6428
6627
|
"opacity": true,
|
6429
6628
|
"order": true,
|
@@ -6479,7 +6678,9 @@ jQuery.extend( {
|
|
6479
6678
|
}
|
6480
6679
|
|
6481
6680
|
// If a number was passed in, add the unit (except for certain CSS properties)
|
6482
|
-
|
6681
|
+
// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
|
6682
|
+
// "px" to a few hardcoded values.
|
6683
|
+
if ( type === "number" && !isCustomProp ) {
|
6483
6684
|
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
6484
6685
|
}
|
6485
6686
|
|
@@ -6579,18 +6780,29 @@ jQuery.each( [ "height", "width" ], function( i, dimension ) {
|
|
6579
6780
|
set: function( elem, value, extra ) {
|
6580
6781
|
var matches,
|
6581
6782
|
styles = getStyles( elem ),
|
6582
|
-
|
6583
|
-
|
6584
|
-
|
6585
|
-
|
6586
|
-
|
6587
|
-
|
6588
|
-
|
6589
|
-
|
6783
|
+
|
6784
|
+
// Only read styles.position if the test has a chance to fail
|
6785
|
+
// to avoid forcing a reflow.
|
6786
|
+
scrollboxSizeBuggy = !support.scrollboxSize() &&
|
6787
|
+
styles.position === "absolute",
|
6788
|
+
|
6789
|
+
// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
|
6790
|
+
boxSizingNeeded = scrollboxSizeBuggy || extra,
|
6791
|
+
isBorderBox = boxSizingNeeded &&
|
6792
|
+
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
6793
|
+
subtract = extra ?
|
6794
|
+
boxModelAdjustment(
|
6795
|
+
elem,
|
6796
|
+
dimension,
|
6797
|
+
extra,
|
6798
|
+
isBorderBox,
|
6799
|
+
styles
|
6800
|
+
) :
|
6801
|
+
0;
|
6590
6802
|
|
6591
6803
|
// Account for unreliable border-box dimensions by comparing offset* to computed and
|
6592
6804
|
// faking a content-box to get border and padding (gh-3699)
|
6593
|
-
if ( isBorderBox &&
|
6805
|
+
if ( isBorderBox && scrollboxSizeBuggy ) {
|
6594
6806
|
subtract -= Math.ceil(
|
6595
6807
|
elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
|
6596
6808
|
parseFloat( styles[ dimension ] ) -
|
@@ -6758,9 +6970,9 @@ Tween.propHooks = {
|
|
6758
6970
|
// Use .style if available and use plain properties where available.
|
6759
6971
|
if ( jQuery.fx.step[ tween.prop ] ) {
|
6760
6972
|
jQuery.fx.step[ tween.prop ]( tween );
|
6761
|
-
} else if ( tween.elem.nodeType === 1 &&
|
6762
|
-
|
6763
|
-
|
6973
|
+
} else if ( tween.elem.nodeType === 1 && (
|
6974
|
+
jQuery.cssHooks[ tween.prop ] ||
|
6975
|
+
tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
|
6764
6976
|
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
6765
6977
|
} else {
|
6766
6978
|
tween.elem[ tween.prop ] = tween.now;
|
@@ -8467,6 +8679,10 @@ jQuery.param = function( a, traditional ) {
|
|
8467
8679
|
encodeURIComponent( value == null ? "" : value );
|
8468
8680
|
};
|
8469
8681
|
|
8682
|
+
if ( a == null ) {
|
8683
|
+
return "";
|
8684
|
+
}
|
8685
|
+
|
8470
8686
|
// If an array was passed in, assume that it is an array of form elements.
|
8471
8687
|
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
8472
8688
|
|
@@ -8969,12 +9185,14 @@ jQuery.extend( {
|
|
8969
9185
|
if ( !responseHeaders ) {
|
8970
9186
|
responseHeaders = {};
|
8971
9187
|
while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
|
8972
|
-
responseHeaders[ match[ 1 ].toLowerCase()
|
9188
|
+
responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
|
9189
|
+
( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
|
9190
|
+
.concat( match[ 2 ] );
|
8973
9191
|
}
|
8974
9192
|
}
|
8975
|
-
match = responseHeaders[ key.toLowerCase() ];
|
9193
|
+
match = responseHeaders[ key.toLowerCase() + " " ];
|
8976
9194
|
}
|
8977
|
-
return match == null ? null : match;
|
9195
|
+
return match == null ? null : match.join( ", " );
|
8978
9196
|
},
|
8979
9197
|
|
8980
9198
|
// Raw string
|
@@ -9363,7 +9581,7 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
|
|
9363
9581
|
} );
|
9364
9582
|
|
9365
9583
|
|
9366
|
-
jQuery._evalUrl = function( url ) {
|
9584
|
+
jQuery._evalUrl = function( url, options ) {
|
9367
9585
|
return jQuery.ajax( {
|
9368
9586
|
url: url,
|
9369
9587
|
|
@@ -9373,7 +9591,16 @@ jQuery._evalUrl = function( url ) {
|
|
9373
9591
|
cache: true,
|
9374
9592
|
async: false,
|
9375
9593
|
global: false,
|
9376
|
-
|
9594
|
+
|
9595
|
+
// Only evaluate the response if it is successful (gh-4126)
|
9596
|
+
// dataFilter is not invoked for failure responses, so using it instead
|
9597
|
+
// of the default converter is kludgy but it works.
|
9598
|
+
converters: {
|
9599
|
+
"text script": function() {}
|
9600
|
+
},
|
9601
|
+
dataFilter: function( response ) {
|
9602
|
+
jQuery.globalEval( response, options );
|
9603
|
+
}
|
9377
9604
|
} );
|
9378
9605
|
};
|
9379
9606
|
|
@@ -9656,24 +9883,21 @@ jQuery.ajaxPrefilter( "script", function( s ) {
|
|
9656
9883
|
// Bind script tag hack transport
|
9657
9884
|
jQuery.ajaxTransport( "script", function( s ) {
|
9658
9885
|
|
9659
|
-
// This transport only deals with cross domain requests
|
9660
|
-
if ( s.crossDomain ) {
|
9886
|
+
// This transport only deals with cross domain or forced-by-attrs requests
|
9887
|
+
if ( s.crossDomain || s.scriptAttrs ) {
|
9661
9888
|
var script, callback;
|
9662
9889
|
return {
|
9663
9890
|
send: function( _, complete ) {
|
9664
|
-
script = jQuery( "<script>" )
|
9665
|
-
|
9666
|
-
src: s.url
|
9667
|
-
|
9668
|
-
"load error",
|
9669
|
-
callback = function( evt ) {
|
9891
|
+
script = jQuery( "<script>" )
|
9892
|
+
.attr( s.scriptAttrs || {} )
|
9893
|
+
.prop( { charset: s.scriptCharset, src: s.url } )
|
9894
|
+
.on( "load error", callback = function( evt ) {
|
9670
9895
|
script.remove();
|
9671
9896
|
callback = null;
|
9672
9897
|
if ( evt ) {
|
9673
9898
|
complete( evt.type === "error" ? 404 : 200, evt.type );
|
9674
9899
|
}
|
9675
|
-
}
|
9676
|
-
);
|
9900
|
+
} );
|
9677
9901
|
|
9678
9902
|
// Use native DOM manipulation to avoid our domManip AJAX trickery
|
9679
9903
|
document.head.appendChild( script[ 0 ] );
|