aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes
diff options
context:
space:
mode:
Diffstat (limited to 'src/attributes')
-rw-r--r--src/attributes/attr.js17
-rw-r--r--src/attributes/classes.js15
-rw-r--r--src/attributes/prop.js13
-rw-r--r--src/attributes/val.js22
4 files changed, 21 insertions, 46 deletions
diff --git a/src/attributes/attr.js b/src/attributes/attr.js
index afa4f5775..cd34860e1 100644
--- a/src/attributes/attr.js
+++ b/src/attributes/attr.js
@@ -1,13 +1,10 @@
-define( [
- "../core",
- "../core/access",
- "../core/nodeName",
- "../var/rnothtmlwhite",
- "../var/isIE",
- "../selector"
-], function( jQuery, access, nodeName, rnothtmlwhite, isIE ) {
+import jQuery from "../core.js";
+import access from "../core/access.js";
+import nodeName from "../core/nodeName.js";
+import rnothtmlwhite from "../var/rnothtmlwhite.js";
+import isIE from "../var/isIE.js";
-"use strict";
+import "../selector.js";
jQuery.fn.extend( {
attr: function( name, value ) {
@@ -128,5 +125,3 @@ jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name )
}
};
} );
-
-} );
diff --git a/src/attributes/classes.js b/src/attributes/classes.js
index f1571eb5d..e020aa5cf 100644
--- a/src/attributes/classes.js
+++ b/src/attributes/classes.js
@@ -1,12 +1,9 @@
-define( [
- "../core",
- "../core/stripAndCollapse",
- "../var/rnothtmlwhite",
- "../data/var/dataPriv",
- "../core/init"
-], function( jQuery, stripAndCollapse, rnothtmlwhite, dataPriv ) {
+import jQuery from "../core.js";
+import stripAndCollapse from "../core/stripAndCollapse.js";
+import rnothtmlwhite from "../var/rnothtmlwhite.js";
+import dataPriv from "../data/var/dataPriv.js";
-"use strict";
+import "../core/init.js";
function getClass( elem ) {
return elem.getAttribute && elem.getAttribute( "class" ) || "";
@@ -181,5 +178,3 @@ jQuery.fn.extend( {
return false;
}
} );
-
-} );
diff --git a/src/attributes/prop.js b/src/attributes/prop.js
index 651d9e215..d58adf369 100644
--- a/src/attributes/prop.js
+++ b/src/attributes/prop.js
@@ -1,11 +1,8 @@
-define( [
- "../core",
- "../core/access",
- "../var/isIE",
- "../selector"
-], function( jQuery, access, isIE ) {
+import jQuery from "../core.js";
+import access from "../core/access.js";
+import isIE from "../var/isIE.js";
-"use strict";
+import "../selector.js";
var rfocusable = /^(?:input|select|textarea|button)$/i,
rclickable = /^(?:a|area)$/i;
@@ -136,5 +133,3 @@ jQuery.each( [
], function() {
jQuery.propFix[ this.toLowerCase() ] = this;
} );
-
-} );
diff --git a/src/attributes/val.js b/src/attributes/val.js
index 02559ffaa..38e170ba8 100644
--- a/src/attributes/val.js
+++ b/src/attributes/val.js
@@ -1,12 +1,8 @@
-define( [
- "../core",
- "../core/stripAndCollapse",
- "../core/nodeName",
+import jQuery from "../core.js";
+import stripAndCollapse from "../core/stripAndCollapse.js";
+import nodeName from "../core/nodeName.js";
- "../core/init"
-], function( jQuery, stripAndCollapse, nodeName ) {
-
-"use strict";
+import "../core/init.js";
var rreturn = /\r/g;
@@ -147,15 +143,11 @@ jQuery.extend( {
while ( i-- ) {
option = options[ i ];
- /* eslint-disable no-cond-assign */
-
- if ( option.selected =
+ if ( ( option.selected =
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
- ) {
+ ) ) {
optionSet = true;
}
-
- /* eslint-enable no-cond-assign */
}
// Force browsers to behave consistently when non-matching value is set
@@ -178,5 +170,3 @@ jQuery.each( [ "radio", "checkbox" ], function() {
}
};
} );
-
-} );