support.js (786B)
1 define( [ 2 "../var/document", 3 "../var/support" 4 ], function( document, support ) { 5 6 "use strict"; 7 8 ( function() { 9 var input = document.createElement( "input" ), 10 select = document.createElement( "select" ), 11 opt = select.appendChild( document.createElement( "option" ) ); 12 13 input.type = "checkbox"; 14 15 // Support: Android <=4.3 only 16 // Default value for a checkbox should be "on" 17 support.checkOn = input.value !== ""; 18 19 // Support: IE <=11 only 20 // Must access selectedIndex to make default options select 21 support.optSelected = opt.selected; 22 23 // Support: IE <=11 only 24 // An input loses its value after becoming a radio 25 input = document.createElement( "input" ); 26 input.value = "t"; 27 input.type = "radio"; 28 support.radioValue = input.value === "t"; 29 } )(); 30 31 return support; 32 33 } );