// Keep references to cloned scripts for later restoration
if ( hasScripts ) {
- core_push.apply( scripts, getAll( node, "script" ) );
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( scripts, getAll( node, "script" ) );
}
}
elems = i === last ? this : this.clone( true );
jQuery( insert[ i ] )[ original ]( elems );
- core_push.apply( ret, elems );
+ // Support: QtWebKit
+ // .get() because core_push.apply(_, arraylike) throws
+ core_push.apply( ret, elems.get() );
}
return this.pushStack( ret );
// Add nodes directly
if ( jQuery.type( elem ) === "object" ) {
- core_push.apply( nodes, elem.nodeType ? [ elem ] : elem );
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
// Convert non-html into a text node
} else if ( !rhtml.test( elem ) ) {
tmp = tmp.firstChild;
}
- core_push.apply( nodes, tmp.childNodes );
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( nodes, tmp.childNodes );
// Remember the top-level container
tmp = fragment.firstChild;