mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Use jQuery.merge only if it really necessary
This commit is contained in:
parent
d552b94463
commit
d086aa16b3
@ -295,7 +295,7 @@ jQuery.fn.extend({
|
|||||||
|
|
||||||
// Keep references to cloned scripts for later restoration
|
// Keep references to cloned scripts for later restoration
|
||||||
if ( hasScripts ) {
|
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 ) {
|
if ( elem || elem === 0 ) {
|
||||||
// Add nodes directly
|
// Add nodes directly
|
||||||
if ( jQuery.type( elem ) === "object" ) {
|
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
|
// Convert non-html into a text node
|
||||||
} else if ( !rhtml.test( elem ) ) {
|
} else if ( !rhtml.test( elem ) ) {
|
||||||
@ -450,7 +450,7 @@ jQuery.extend({
|
|||||||
tmp = tmp.lastChild;
|
tmp = tmp.lastChild;
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery.merge( ret, tmp.childNodes );
|
core_push.apply( ret, tmp.childNodes );
|
||||||
|
|
||||||
// Fix #12392 for WebKit and IE > 9
|
// Fix #12392 for WebKit and IE > 9
|
||||||
tmp.textContent = "";
|
tmp.textContent = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user