Skip to content

Commit 17f2a68

Browse files
committed
Release 3.6.2
1 parent 3711efe commit 17f2a68

File tree

15 files changed

+310
-56
lines changed

15 files changed

+310
-56
lines changed

AUTHORS.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,5 @@ fecore1 <89127124+fecore1@users.noreply.github.com>
333333
ygj6 <7699524+ygj6@users.noreply.github.com>
334334
Simon Legner <Simon.Legner@gmail.com>
335335
Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
336+
Anders Kaseorg <andersk@mit.edu>
337+
Alex <aleksandrosansan@gmail.com>

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
For information on how to get started and how to use jQuery, please see [jQuery's documentation](https://api.jquery.com/).
66
For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).
77

8-
If upgrading, please see the [blog post for 3.6.1](https://blog.jquery.com/2022/08/26/jquery-3-6-1-maintenance-release/). This includes notable differences from the previous version and a more readable changelog.
8+
If upgrading, please see the [blog post for 3.6.2](https://blog.jquery.com/2022/12/13/jquery-3-6-2-released/). This includes notable differences from the previous version and a more readable changelog.
99

1010
## Including jQuery
1111

@@ -16,20 +16,18 @@ Below are some of the most common ways to include jQuery.
1616
#### Script tag
1717

1818
```html
19-
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
19+
<script src="https://code.jquery.com/jquery-3.6.2.min.js"></script>
2020
```
2121

22-
#### Babel
22+
#### Webpack / Browserify / Babel
2323

24-
[Babel](https://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.
24+
There are several ways to use [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Babel](https://babeljs.io/). For more information on using these tools, please refer to the corresponding project's documentation. In the script, including jQuery will usually look like this:
2525

2626
```js
2727
import $ from "jquery";
2828
```
2929

30-
#### Browserify/Webpack
31-
32-
There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.js.org/). For more information on using these tools, please refer to the corresponding project's documentation. In the script, including jQuery will usually look like this...
30+
If you need to use jQuery in a file that's not an ECMAScript module, you can use the CommonJS syntax:
3331

3432
```js
3533
var $ = require( "jquery" );

dist/jquery.js

Lines changed: 97 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* jQuery JavaScript Library v3.6.1
2+
* jQuery JavaScript Library v3.6.2
33
* https://jquery.com/
44
*
55
* Includes Sizzle.js
@@ -9,7 +9,7 @@
99
* Released under the MIT license
1010
* https://jquery.org/license
1111
*
12-
* Date: 2022-08-26T17:52Z
12+
* Date: 2022-12-13T14:56Z
1313
*/
1414
( function( global, factory ) {
1515

@@ -151,7 +151,7 @@ function toType( obj ) {
151151

152152

153153
var
154-
version = "3.6.1",
154+
version = "3.6.2",
155155

156156
// Define a local copy of jQuery
157157
jQuery = function( selector, context ) {
@@ -522,14 +522,14 @@ function isArrayLike( obj ) {
522522
}
523523
var Sizzle =
524524
/*!
525-
* Sizzle CSS Selector Engine v2.3.6
525+
* Sizzle CSS Selector Engine v2.3.8
526526
* https://sizzlejs.com/
527527
*
528528
* Copyright JS Foundation and other contributors
529529
* Released under the MIT license
530530
* https://js.foundation/
531531
*
532-
* Date: 2021-02-16
532+
* Date: 2022-11-16
533533
*/
534534
( function( window ) {
535535
var i,
@@ -879,6 +879,27 @@ function Sizzle( selector, context, results, seed ) {
879879
}
880880

881881
try {
882+
883+
// `qSA` may not throw for unrecognized parts using forgiving parsing:
884+
// https://drafts.csswg.org/selectors/#forgiving-selector
885+
// like the `:has()` pseudo-class:
886+
// https://drafts.csswg.org/selectors/#relational
887+
// `CSS.supports` is still expected to return `false` then:
888+
// https://drafts.csswg.org/css-conditional-4/#typedef-supports-selector-fn
889+
// https://drafts.csswg.org/css-conditional-4/#dfn-support-selector
890+
if ( support.cssSupportsSelector &&
891+
892+
// eslint-disable-next-line no-undef
893+
!CSS.supports( "selector(" + newSelector + ")" ) ) {
894+
895+
// Support: IE 11+
896+
// Throw to get to the same code path as an error directly in qSA.
897+
// Note: once we only support browser supporting
898+
// `CSS.supports('selector(...)')`, we can most likely drop
899+
// the `try-catch`. IE doesn't implement the API.
900+
throw new Error();
901+
}
902+
882903
push.apply( results,
883904
newContext.querySelectorAll( newSelector )
884905
);
@@ -1174,6 +1195,31 @@ setDocument = Sizzle.setDocument = function( node ) {
11741195
!el.querySelectorAll( ":scope fieldset div" ).length;
11751196
} );
11761197

1198+
// Support: Chrome 105+, Firefox 104+, Safari 15.4+
1199+
// Make sure forgiving mode is not used in `CSS.supports( "selector(...)" )`.
1200+
//
1201+
// `:is()` uses a forgiving selector list as an argument and is widely
1202+
// implemented, so it's a good one to test against.
1203+
support.cssSupportsSelector = assert( function() {
1204+
/* eslint-disable no-undef */
1205+
1206+
return CSS.supports( "selector(*)" ) &&
1207+
1208+
// Support: Firefox 78-81 only
1209+
// In old Firefox, `:is()` didn't use forgiving parsing. In that case,
1210+
// fail this test as there's no selector to test against that.
1211+
// `CSS.supports` uses unforgiving parsing
1212+
document.querySelectorAll( ":is(:jqfake)" ) &&
1213+
1214+
// `*` is needed as Safari & newer Chrome implemented something in between
1215+
// for `:has()` - it throws in `qSA` if it only contains an unsupported
1216+
// argument but multiple ones, one of which is supported, are fine.
1217+
// We want to play safe in case `:is()` gets the same treatment.
1218+
!CSS.supports( "selector(:is(*,:jqfake))" );
1219+
1220+
/* eslint-enable */
1221+
} );
1222+
11771223
/* Attributes
11781224
---------------------------------------------------------------------- */
11791225

@@ -1440,6 +1486,18 @@ setDocument = Sizzle.setDocument = function( node ) {
14401486
} );
14411487
}
14421488

1489+
if ( !support.cssSupportsSelector ) {
1490+
1491+
// Support: Chrome 105+, Safari 15.4+
1492+
// `:has()` uses a forgiving selector list as an argument so our regular
1493+
// `try-catch` mechanism fails to catch `:has()` with arguments not supported
1494+
// natively like `:has(:contains("Foo"))`. Where supported & spec-compliant,
1495+
// we now use `CSS.supports("selector(SELECTOR_TO_BE_TESTED)")` but outside
1496+
// that, let's mark `:has` as buggy to always use jQuery traversal for
1497+
// `:has()`.
1498+
rbuggyQSA.push( ":has" );
1499+
}
1500+
14431501
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
14441502
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
14451503

@@ -1452,7 +1510,14 @@ setDocument = Sizzle.setDocument = function( node ) {
14521510
// As in, an element does not contain itself
14531511
contains = hasCompare || rnative.test( docElem.contains ) ?
14541512
function( a, b ) {
1455-
var adown = a.nodeType === 9 ? a.documentElement : a,
1513+
1514+
// Support: IE <9 only
1515+
// IE doesn't have `contains` on `document` so we need to check for
1516+
// `documentElement` presence.
1517+
// We need to fall back to `a` when `documentElement` is missing
1518+
// as `ownerDocument` of elements within `<template/>` may have
1519+
// a null one - a default behavior of all modern browsers.
1520+
var adown = a.nodeType === 9 && a.documentElement || a,
14561521
bup = b && b.parentNode;
14571522
return a === bup || !!( bup && bup.nodeType === 1 && (
14581523
adown.contains ?
@@ -2242,7 +2307,7 @@ Expr = Sizzle.selectors = {
22422307
return elem.nodeName.toLowerCase() === "input" &&
22432308
elem.type === "text" &&
22442309

2245-
// Support: IE<8
2310+
// Support: IE <10 only
22462311
// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
22472312
( ( attr = elem.getAttribute( "type" ) ) == null ||
22482313
attr.toLowerCase() === "text" );
@@ -6608,17 +6673,37 @@ function curCSS( elem, name, computed ) {
66086673
// .css('filter') (IE 9 only, trac-12537)
66096674
// .css('--customProperty) (gh-3144)
66106675
if ( computed ) {
6611-
ret = computed.getPropertyValue( name ) || computed[ name ];
66126676

6613-
// trim whitespace for custom property (issue gh-4926)
6614-
if ( isCustomProp ) {
6677+
// Support: IE <=9 - 11+
6678+
// IE only supports `"float"` in `getPropertyValue`; in computed styles
6679+
// it's only available as `"cssFloat"`. We no longer modify properties
6680+
// sent to `.css()` apart from camelCasing, so we need to check both.
6681+
// Normally, this would create difference in behavior: if
6682+
// `getPropertyValue` returns an empty string, the value returned
6683+
// by `.css()` would be `undefined`. This is usually the case for
6684+
// disconnected elements. However, in IE even disconnected elements
6685+
// with no styles return `"none"` for `getPropertyValue( "float" )`
6686+
ret = computed.getPropertyValue( name ) || computed[ name ];
66156687

6616-
// rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED
6688+
if ( isCustomProp && ret ) {
6689+
6690+
// Support: Firefox 105+, Chrome <=105+
6691+
// Spec requires trimming whitespace for custom properties (gh-4926).
6692+
// Firefox only trims leading whitespace. Chrome just collapses
6693+
// both leading & trailing whitespace to a single space.
6694+
//
6695+
// Fall back to `undefined` if empty string returned.
6696+
// This collapses a missing definition with property defined
6697+
// and set to an empty string but there's no standard API
6698+
// allowing us to differentiate them without a performance penalty
6699+
// and returning `undefined` aligns with older jQuery.
6700+
//
6701+
// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
66176702
// as whitespace while CSS does not, but this is not a problem
66186703
// because CSS preprocessing replaces them with U+000A LINE FEED
66196704
// (which *is* CSS whitespace)
66206705
// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
6621-
ret = ret.replace( rtrimCSS, "$1" );
6706+
ret = ret.replace( rtrimCSS, "$1" ) || undefined;
66226707
}
66236708

66246709
if ( ret === "" && !isAttached( elem ) ) {

dist/jquery.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)