support.js 786 B

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