You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 satır
1.0KB

  1. define( [
  2. "../var/document",
  3. "../var/support"
  4. ], function( document, support ) {
  5. ( function() {
  6. var fragment = document.createDocumentFragment(),
  7. div = fragment.appendChild( document.createElement( "div" ) ),
  8. input = document.createElement( "input" );
  9. // Support: Android 4.0-4.3, Safari<=5.1
  10. // Check state lost if the name is set (#11217)
  11. // Support: Windows Web Apps (WWA)
  12. // `name` and `type` must use .setAttribute for WWA (#14901)
  13. input.setAttribute( "type", "radio" );
  14. input.setAttribute( "checked", "checked" );
  15. input.setAttribute( "name", "t" );
  16. div.appendChild( input );
  17. // Support: Safari<=5.1, Android<4.2
  18. // Older WebKit doesn't clone checked state correctly in fragments
  19. support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
  20. // Support: IE<=11+
  21. // Make sure textarea (and checkbox) defaultValue is properly cloned
  22. div.innerHTML = "<textarea>x</textarea>";
  23. support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
  24. } )();
  25. return support;
  26. } );