aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation/support.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/manipulation/support.js')
-rw-r--r--src/manipulation/support.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/manipulation/support.js b/src/manipulation/support.js
new file mode 100644
index 000000000..62c932c11
--- /dev/null
+++ b/src/manipulation/support.js
@@ -0,0 +1,29 @@
+define([
+ "../var/support"
+], function( support ){
+
+(function () {
+ var input = document.createElement( "input" ),
+ fragment = document.createDocumentFragment();
+
+ input.type = "checkbox";
+
+ // Make sure checked status is properly cloned
+ // Support: IE9, IE10
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "checked", "t" );
+ input.setAttribute( "name", "t" );
+
+ fragment.appendChild( input );
+
+ // Support: Safari 5.1, Android 4.x, Android 2.3
+ // old WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+})();
+
+return support;
+
+});