From e8b7db4b0f1e1b8e08578641b30a92b955ccc4ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Thu, 4 Jan 2024 01:06:40 +0100 Subject: [PATCH] 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 --- src/attributes/attr.js | 2 -- src/attributes/prop.js | 2 -- src/css.js | 1 - src/manipulation.js | 1 - src/offset.js | 1 - 5 files changed, 7 deletions(-) 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 ) { -- 2.39.5