support.js 927 B

123456789101112131415161718192021222324252627282930313233343536
  1. define( [
  2. "../var/document",
  3. "../var/support"
  4. ], function( document, support ) {
  5. ( function() {
  6. var input = document.createElement( "input" ),
  7. select = document.createElement( "select" ),
  8. opt = select.appendChild( document.createElement( "option" ) );
  9. input.type = "checkbox";
  10. // Support: iOS<=5.1, Android<=4.2+
  11. // Default value for a checkbox should be "on"
  12. support.checkOn = input.value !== "";
  13. // Support: IE<=11+
  14. // Must access selectedIndex to make default options select
  15. support.optSelected = opt.selected;
  16. // Support: Android<=2.3
  17. // Options inside disabled selects are incorrectly marked as disabled
  18. select.disabled = true;
  19. support.optDisabled = !opt.disabled;
  20. // Support: IE<=11+
  21. // An input loses its value after becoming a radio
  22. input = document.createElement( "input" );
  23. input.value = "t";
  24. input.type = "radio";
  25. support.radioValue = input.value === "t";
  26. } )();
  27. return support;
  28. } );