aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2024-11-04 23:59:30 +0100
committerGitHub <noreply@github.com>2024-11-04 23:59:30 +0100
commit329661fd538a07993a2fcfa2a75fdd7f5667f86c (patch)
treea6e175eb264024baa819f8926c83deb8f38f9d27 /src
parent07c9f02bd6cf27c0e1e38345c97f5c3e2718134f (diff)
downloadjquery-329661fd538a07993a2fcfa2a75fdd7f5667f86c.tar.gz
jquery-329661fd538a07993a2fcfa2a75fdd7f5667f86c.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/deprecated.js2
-rw-r--r--src/selector.js2
2 files changed, 3 insertions, 1 deletions
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 ) {