From 329661fd538a07993a2fcfa2a75fdd7f5667f86c Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Mon, 4 Nov 2024 23:59:30 +0100 Subject: Selector: Properly deprecate `jQuery.expr[ ":" ]`/`jQuery.expr.filters` Those APIs have formally been deprecated since `3.0.0`, but they never made its way into the deprecated module. `jQuery.expr[ ":" ]` has been removed when Sizzle got inlined into Core in gh-4395; this change restores it. Closes gh-5580 Ref gh-5570 Ref gh-4395 --- src/deprecated.js | 2 ++ src/selector.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/deprecated.js b/src/deprecated.js index b2f767cdf..ffeeb4ab7 100644 --- a/src/deprecated.js +++ b/src/deprecated.js @@ -43,4 +43,6 @@ jQuery.holdReady = function( hold ) { } }; +jQuery.expr[ ":" ] = jQuery.expr.filters = jQuery.expr.pseudos; + export { jQuery, jQuery as $ }; diff --git a/src/selector.js b/src/selector.js index da535718e..29659206e 100644 --- a/src/selector.js +++ b/src/selector.js @@ -846,7 +846,7 @@ for ( i in { submit: true, reset: true } ) { // Easy API for creating new setFilters function setFilters() {} -setFilters.prototype = jQuery.expr.filters = jQuery.expr.pseudos; +setFilters.prototype = jQuery.expr.pseudos; jQuery.expr.setFilters = new setFilters(); function addCombinator( matcher, combinator, base ) { -- cgit v1.2.3