From: Michał Gołębiowski-Owczarek Date: Thu, 4 Jan 2024 00:06:40 +0000 (+0100) Subject: Selector: Eliminate `selector.js` depenencies from various modules X-Git-Tag: 4.0.0-beta~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e8b7db4b0f1e1b8e08578641b30a92b955ccc4ec;p=jquery.git Selector: Eliminate `selector.js` depenencies from various modules There are two main reasons for why some of those dependencies are no longer needed: 1. `jQuery.contains` which is now a part of `core`. 2. `jQuery.find.attr` no longer exists, native `getAttribute` is used instead. Closes gh-5383 Ref gh-5379 --- diff --git a/src/attributes/attr.js b/src/attributes/attr.js index fb6c3bd7b..ddddcada6 100644 --- a/src/attributes/attr.js +++ b/src/attributes/attr.js @@ -4,8 +4,6 @@ import { nodeName } from "../core/nodeName.js"; import { rnothtmlwhite } from "../var/rnothtmlwhite.js"; import { isIE } from "../var/isIE.js"; -import "../selector.js"; - jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); diff --git a/src/attributes/prop.js b/src/attributes/prop.js index f889e5373..7eef6c8f7 100644 --- a/src/attributes/prop.js +++ b/src/attributes/prop.js @@ -2,8 +2,6 @@ import { jQuery } from "../core.js"; import { access } from "../core/access.js"; import { isIE } from "../var/isIE.js"; -import "../selector.js"; - var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; diff --git a/src/css.js b/src/css.js index f5407470f..72a807bfc 100644 --- a/src/css.js +++ b/src/css.js @@ -17,7 +17,6 @@ import { support } from "./css/support.js"; import "./core/init.js"; import "./core/ready.js"; -import "./selector.js"; // contains var diff --git a/src/manipulation.js b/src/manipulation.js index f8834e57b..c4bda4b5a 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -15,7 +15,6 @@ import { nodeName } from "./core/nodeName.js"; import "./core/init.js"; import "./traversing.js"; -import "./selector.js"; import "./event.js"; var diff --git a/src/offset.js b/src/offset.js index 5a9d3c32e..ca27ca5c7 100644 --- a/src/offset.js +++ b/src/offset.js @@ -5,7 +5,6 @@ import { isWindow } from "./var/isWindow.js"; import "./core/init.js"; import "./css.js"; -import "./selector.js"; // contains jQuery.offset = { setOffset: function( elem, options, i ) {