}
// Recurse if we're merging object literal values
- if ( deep && copy && jQuery.isObjectLiteral(copy) ) {
+ if ( deep && copy && jQuery.isPlainObject(copy) ) {
// Don't extend not object literals
- var clone = src && jQuery.isObjectLiteral(src) ? src : {};
+ var clone = src && jQuery.isPlainObject(src) ? src : {};
// Never move original objects, clone them
target[ name ] = jQuery.extend( deep, clone, copy );
return toString.call(obj) === "[object Array]";
},
- isObjectLiteral: function( obj ) {
+ isPlainObject: function( obj ) {
if ( toString.call(obj) !== "[object Object]" || typeof obj.nodeType === "number" ) {
return false;
}
return true;
},
- // check if an element is in a (or is an) XML document
- isXMLDoc: function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
- },
-
// Evalulates a script in a global context
globalEval: function( data ) {
if ( data && rnotwhite.test(data) ) {