aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2013-08-27 00:54:13 +0200
committerMichał Gołębiowski <m.goleb@gmail.com>2013-09-06 03:38:22 +0200
commitbbbdd947256a3fcd788fb9d4f306046082a1ef1f (patch)
tree2fc5a02969653d281a44a7b3ff6426b5561c8140 /src/manipulation
parent776012b8b3898fad2e0727880f1dc4af5c7b33c1 (diff)
downloadjquery-bbbdd947256a3fcd788fb9d4f306046082a1ef1f.tar.gz
jquery-bbbdd947256a3fcd788fb9d4f306046082a1ef1f.zip
Fix #10814. Make support tests lazy and broken out to components.
Diffstat (limited to 'src/manipulation')
-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;
+
+});