ffffng/app/bower_components/jquery/src/attributes/support.js

36 lines
893 B
JavaScript
Raw Normal View History

2014-05-12 20:08:19 +02:00
define([
"../var/support"
], function( support ) {
(function() {
var input = document.createElement( "input" ),
select = document.createElement( "select" ),
opt = select.appendChild( document.createElement( "option" ) );
input.type = "checkbox";
2016-05-16 13:33:49 +02:00
// Support: iOS<=5.1, Android<=4.2+
// Default value for a checkbox should be "on"
2014-05-12 20:08:19 +02:00
support.checkOn = input.value !== "";
2016-05-16 13:33:49 +02:00
// Support: IE<=11+
// Must access selectedIndex to make default options select
2014-05-12 20:08:19 +02:00
support.optSelected = opt.selected;
2016-05-16 13:33:49 +02:00
// Support: Android<=2.3
// Options inside disabled selects are incorrectly marked as disabled
2014-05-12 20:08:19 +02:00
select.disabled = true;
support.optDisabled = !opt.disabled;
2016-05-16 13:33:49 +02:00
// Support: IE<=11+
// An input loses its value after becoming a radio
2014-05-12 20:08:19 +02:00
input = document.createElement( "input" );
input.value = "t";
input.type = "radio";
support.radioValue = input.value === "t";
})();
return support;
});