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