8000 Selector: Make `selector.js` module depend on `attributes/attr.js` · jquery/jquery@f192303 · GitHub
[go: up one dir, main page]

10000
Skip to content

Commit f192303

Browse files
committed
Selector: Make selector.js module depend on attributes/attr.js
This fixes custom builds using the `--include` switch that don't include the `attributes` module. Fixes gh-5379
1 parent e8b7db4 commit f192303

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/attributes/attr.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ if ( isIE ) {
9797
};
9898
}
9999

100-
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
100+
jQuery.each( (
101+
"checked selected async autofocus autoplay controls defer disabled" +
102+
" hidden ismap loop multiple open readonly required scoped"
103+
).split( " " ), function( _i, name ) {
101104
jQuery.attrHooks[ name ] = {
102105
get: function( elem ) {
103106
var ret,

src/selector-native.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { jQuery } from "./core.js";
2525
import { document } from "./var/document.js";
2626
import { whitespace } from "./var/whitespace.js";
2727
import { isIE } from "./var/isIE.js";
28-
import { booleans } from "./selector/var/booleans.js";
2928
import { rleadingCombinator } from "./selector/var/rleadingCombinator.js";
3029
import { rdescend } from "./selector/var/rdescend.js";
3130
import { rsibling } from "./selector/var/rsibling.js";
@@ -41,7 +40,6 @@ import "./selector/escapeSelector.js";
4140
import "./selector/uniqueSort.js";
4241

4342
var matchExpr = jQuery.extend( {
44-
bool: new RegExp( "^(?:" + booleans + ")$", "i" ),
4543
needsContext: new RegExp( "^" + whitespace + "*[>+~]" )
4644
}, filterMatchExpr );
4745

src/selector.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { rbuggyQSA } from "./selector/rbuggyQSA.js";
99
import { rtrimCSS } from "./var/rtrimCSS.js";
1010
import { isIE } from "./var/isIE.js";
1111
import { identifier } from "./selector/var/identifier.js";
12-
import { booleans } from "./selector/var/booleans.js";
1312
import { rleadingCombinator } from "./selector/var/rleadingCombinator.js";
1413
import { rdescend } from "./selector/var/rdescend.js";
1514
import { rsibling } from "./selector/var/rsibling.js";
@@ -24,6 +23,7 @@ import { tokenize } from "./selector/tokenize.js";
2423
import { toSelector } from "./selector/toSelector.js";
2524

2625
// The following utils are attached directly to the jQuery object.
26+
import "./attributes/attr.js"; // jQuery.attr
2727
import "./selector/escapeSelector.js";
2828
import "./selector/uniqueSort.js";
2929

@@ -50,7 +50,6 @@ var i,
5050
ridentifier = new RegExp( "^" + identifier + "$" ),
5151

5252
matchExpr = jQuery.extend( {
53-
bool: new RegExp( "^(?:" + booleans + ")$", "i" ),
5453

5554
// For use in libraries implementing .is()
5655
// We use this for POS matching in `select`

src/selector/var/booleans.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0