mirror of
https://github.com/jquery/jquery.git
synced 2026-02-07 10:45:27 -05:00
Remove test of the invalid object for IE9's sake; Rewrite the appropriate support test for html5 clone caching. Fixes #10682
This commit is contained in:
@@ -483,7 +483,7 @@ jQuery.buildFragment = function( args, nodes, scripts ) {
|
||||
if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
|
||||
first.charAt(0) === "<" && !rnocache.test( first ) &&
|
||||
(jQuery.support.checkClone || !rchecked.test( first )) &&
|
||||
(!jQuery.support.unknownElems && rnoshimcache.test( first )) ) {
|
||||
(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
|
||||
|
||||
cacheable = true;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ jQuery.support = (function() {
|
||||
|
||||
// Preliminary tests
|
||||
div.setAttribute("className", "t");
|
||||
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>";
|
||||
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
|
||||
|
||||
|
||||
all = div.getElementsByTagName( "*" );
|
||||
@@ -69,9 +69,6 @@ jQuery.support = (function() {
|
||||
// (IE uses styleFloat instead of cssFloat)
|
||||
cssFloat: !!a.style.cssFloat,
|
||||
|
||||
// Make sure unknown elements (like HTML5 elems) are handled appropriately
|
||||
unknownElems: !!div.getElementsByTagName( "nav" ).length,
|
||||
|
||||
// Make sure that if no value is specified for a checkbox
|
||||
// that it defaults to "on".
|
||||
// (WebKit defaults to "" instead)
|
||||
@@ -87,6 +84,10 @@ jQuery.support = (function() {
|
||||
// Tests for enctype support on a form(#6743)
|
||||
enctype: !!document.createElement("form").enctype,
|
||||
|
||||
// Makes sure cloning an html5 element does not cause problems
|
||||
// Where outerHTML is undefined, this still works
|
||||
html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
|
||||
|
||||
// Will be defined later
|
||||
submitBubbles: true,
|
||||
changeBubbles: true,
|
||||
|
||||
Reference in New Issue
Block a user