e36b7e372496c7498fbf26cfcfe38620cf82162db51c7c18e19d49b9978ad47019fd74f1a7e3f91e00fcbce9be56c24c5280805efb59bedf8d37f81fb9b031 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. define( [
  2. "../var/document",
  3. "../var/support"
  4. ], function( document, support ) {
  5. "use strict";
  6. ( function() {
  7. var fragment = document.createDocumentFragment(),
  8. div = fragment.appendChild( document.createElement( "div" ) ),
  9. input = document.createElement( "input" );
  10. // Support: Android 4.0 - 4.3 only
  11. // Check state lost if the name is set (trac-11217)
  12. // Support: Windows Web Apps (WWA)
  13. // `name` and `type` must use .setAttribute for WWA (trac-14901)
  14. input.setAttribute( "type", "radio" );
  15. input.setAttribute( "checked", "checked" );
  16. input.setAttribute( "name", "t" );
  17. div.appendChild( input );
  18. // Support: Android <=4.1 only
  19. // Older WebKit doesn't clone checked state correctly in fragments
  20. support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
  21. // Support: IE <=11 only
  22. // Make sure textarea (and checkbox) defaultValue is properly cloned
  23. div.innerHTML = "<textarea>x</textarea>";
  24. support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
  25. // Support: IE <=9 only
  26. // IE <=9 replaces <option> tags with their contents when inserted outside of
  27. // the select element.
  28. div.innerHTML = "<option></option>";
  29. support.option = !!div.lastChild;
  30. } )();
  31. return support;
  32. } );