利用数组自带的isArray来判断
7、isPlainObject
if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
;
}
Support: Firefox <20
The try/catch suppresses exceptions thrown when attempting to access
the "constructor" property of certain host objects,ie. |window.location|
https://bugzilla.mozilla.org/show_bug.cgi?id=814622
try {
if ( obj.constructor &&
!core_hasOwn.call( obj.constructor.prototype,"isPrototypeOf" ) ) {
;
}
} catch ( e ) {
If the function hasn't returned already,we're confident that
|obj| is a plain object,created by {} or constructed with new Object
isArraylike
(such as loading iframes in IE - #4833)
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
xml的根节点不可能是HTML
return documentElement ? documentElement.nodeName !== "HTML" : ;
};
Support tests
不是xml就是HTML
documentIsHTML = !isXML( doc );