aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes/val.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-04-29 22:56:09 +0200
committerGitHub <noreply@github.com>2019-04-29 22:56:09 +0200
commitcf84696fd1d7fe314a11492606529b5a658ee9e3 (patch)
tree8fd4a45dd755e5f1215adbc82e7870727c8164e8 /src/attributes/val.js
parentbde53edcf4bd6c975d068eed4eb16c5ba09c1cff (diff)
downloadjquery-cf84696fd1d7fe314a11492606529b5a658ee9e3.tar.gz
jquery-cf84696fd1d7fe314a11492606529b5a658ee9e3.zip
Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS
Also, update support comments format to match format described in: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197 with the change from: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-448998379 (open-ended ranges end with `+`). Fixes gh-3950 Fixes gh-4299 Closes gh-4347
Diffstat (limited to 'src/attributes/val.js')
-rw-r--r--src/attributes/val.js17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/attributes/val.js b/src/attributes/val.js
index c719b34b3..f7d6cf190 100644
--- a/src/attributes/val.js
+++ b/src/attributes/val.js
@@ -1,12 +1,10 @@
define( [
"../core",
"../core/stripAndCollapse",
- "./support",
"../core/nodeName",
- "../var/isFunction",
"../core/init"
-], function( jQuery, stripAndCollapse, support, nodeName, isFunction ) {
+], function( jQuery, stripAndCollapse, nodeName ) {
"use strict";
@@ -43,7 +41,7 @@ jQuery.fn.extend( {
return;
}
- valueIsFunction = isFunction( value );
+ valueIsFunction = typeof value === "function";
return this.each( function( i ) {
var val;
@@ -90,7 +88,7 @@ jQuery.extend( {
return val != null ?
val :
- // Support: IE <=10 - 11 only
+ // Support: IE <=10 - 11+
// option.text throws exceptions (#14686, #14858)
// Strip and collapse whitespace
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
@@ -117,9 +115,7 @@ jQuery.extend( {
for ( ; i < max; i++ ) {
option = options[ i ];
- // Support: IE <=9 only
- // IE8-9 doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
+ if ( option.selected &&
// Don't return options that are disabled or in a disabled optgroup
!option.disabled &&
@@ -181,11 +177,6 @@ jQuery.each( [ "radio", "checkbox" ], function() {
}
}
};
- if ( !support.checkOn ) {
- jQuery.valHooks[ this ].get = function( elem ) {
- return elem.getAttribute( "value" ) === null ? "on" : elem.value;
- };
- }
} );
} );