support.js 893 B

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