aboutsummaryrefslogtreecommitdiffstats
path: root/src/css
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-09-20 02:31:35 +0200
committerGitHub <noreply@github.com>2023-09-20 02:31:35 +0200
commit53cf7244da2a2040333335c36e435b1c12efdff9 (patch)
tree5331bd464dcc51d7ff1b923ccd5868a733c18234 /src/css
parent5f869590924b7dea6a16d176b18700939f4b5290 (diff)
downloadjquery-53cf7244da2a2040333335c36e435b1c12efdff9.tar.gz
jquery-53cf7244da2a2040333335c36e435b1c12efdff9.zip
CSS:Selector: Align with 3.x, remove the outer `selector.js` wrapper
Bring some changes from `3.x-stable`: * rename `rtrim` to `rtrimCSS` to distinguish from the previous `rtrim` regex used for `jQuery.trim` * backport one `id` selector test that avoids the selector engine path Other changes: * remove the inner function wrapper from `selector.js` by renaming the imported `document.js` value * use `jQuery.error` in `selectorError` * make Selector tests pass in all-modules runs by fixing a sinon mistake in Core tests - Core tests had a spy set up for `jQuery.error` that wasn't cleaned up, influencing Selector tests when all were run together Closes gh-5295
Diffstat (limited to 'src/css')
-rw-r--r--src/css/curCSS.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/css/curCSS.js b/src/css/curCSS.js
index 16104d893..b0f0a7555 100644
--- a/src/css/curCSS.js
+++ b/src/css/curCSS.js
@@ -2,7 +2,7 @@ import { jQuery } from "../core.js";
import { isAttached } from "../core/isAttached.js";
import { getStyles } from "./var/getStyles.js";
import { rcustomProp } from "./var/rcustomProp.js";
-import { rtrim } from "../var/rtrim.js";
+import { rtrimCSS } from "../var/rtrimCSS.js";
export function curCSS( elem, name, computed ) {
var ret,
@@ -41,12 +41,12 @@ export function curCSS( elem, name, computed ) {
// allowing us to differentiate them without a performance penalty
// and returning `undefined` aligns with older jQuery.
//
- // rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED
+ // rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
// as whitespace while CSS does not, but this is not a problem
// because CSS preprocessing replaces them with U+000A LINE FEED
// (which *is* CSS whitespace)
// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
- ret = ret.replace( rtrim, "$1" ) || undefined;
+ ret = ret.replace( rtrimCSS, "$1" ) || undefined;
}
if ( ret === "" && !isAttached( elem ) ) {