mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #11439. Remove use of undefined jQuery.support.parentNode.
This commit is contained in:
parent
dc337f628c
commit
077fd7ed6f
@ -287,7 +287,7 @@ jQuery.fn.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
domManip: function( args, table, callback ) {
|
domManip: function( args, table, callback ) {
|
||||||
var results, first, fragment, parent,
|
var results, first, fragment,
|
||||||
value = args[0],
|
value = args[0],
|
||||||
scripts = [];
|
scripts = [];
|
||||||
|
|
||||||
@ -307,16 +307,7 @@ jQuery.fn.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( this[0] ) {
|
if ( this[0] ) {
|
||||||
parent = value && value.parentNode;
|
results = jQuery.buildFragment( args, this, scripts );
|
||||||
|
|
||||||
// If we're in a fragment, just use that instead of building a new one
|
|
||||||
if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
|
|
||||||
results = { fragment: parent };
|
|
||||||
|
|
||||||
} else {
|
|
||||||
results = jQuery.buildFragment( args, this, scripts );
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment = results.fragment;
|
fragment = results.fragment;
|
||||||
|
|
||||||
if ( fragment.childNodes.length === 1 ) {
|
if ( fragment.childNodes.length === 1 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user