mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Tweaked the isXMLDoc iframe test case to test the document, not the body element (which doesn't exist in IE). Also made the isXMLDoc code handle cases where elem is null, undefined, etc.
This commit is contained in:
@@ -316,7 +316,7 @@ jQuery.extend({
|
||||
isXMLDoc: function( elem ) {
|
||||
// documentElement is verified for cases where it doesn't yet exist
|
||||
// (such as loading iframes in IE - #4833)
|
||||
return ((elem.ownerDocument || elem).documentElement || 0).nodeName !== "HTML";
|
||||
return ((elem ? elem.ownerDocument || elem : 0).documentElement || 0).nodeName !== "HTML";
|
||||
},
|
||||
|
||||
// Evalulates a script in a global context
|
||||
|
||||
Reference in New Issue
Block a user