]> source.dussan.org Git - jquery.git/commitdiff
Use jQuery.merge only if it really necessary
authorOleg <markelog@gmail.com>
Wed, 19 Dec 2012 22:32:54 +0000 (02:32 +0400)
committerOleg <markelog@gmail.com>
Sun, 23 Dec 2012 23:04:08 +0000 (03:04 +0400)
src/manipulation.js

index 134b3a80044dc4d6b0bab84e0412ebf8f3d0a644..f7d0f81f7c55ed8f1866d6e443eb4d7261381ea6 100644 (file)
@@ -295,7 +295,7 @@ jQuery.fn.extend({
 
                                                // Keep references to cloned scripts for later restoration
                                                if ( hasScripts ) {
-                                                       jQuery.merge( scripts, getAll( node, "script" ) );
+                                                       core_push.apply( scripts, getAll( node, "script" ) );
                                                }
                                        }
 
@@ -427,7 +427,7 @@ jQuery.extend({
                        if ( elem || elem === 0 ) {
                                // Add nodes directly
                                if ( jQuery.type( elem ) === "object" ) {
-                                       jQuery.merge( ret, elem.nodeType ? [ elem ] : elem );
+                                       core_push.apply( ret, elem.nodeType ? [ elem ] : elem );
 
                                // Convert non-html into a text node
                                } else if ( !rhtml.test( elem ) ) {
@@ -450,7 +450,7 @@ jQuery.extend({
                                                tmp = tmp.lastChild;
                                        }
 
-                                       jQuery.merge( ret, tmp.childNodes );
+                                       core_push.apply( ret, tmp.childNodes );
 
                                        // Fix #12392 for WebKit and IE > 9
                                        tmp.textContent = "";