Skip to main content

Bug Tracker

Side navigation

Ticket #4833: isXMLDoc.patch
File isXMLDoc.patch, 0.6 KB (added by andr3a, July 27, 2009 01:23PM UTC)

more compact/fast work around

Index: core.js
===================================================================
--- core.js	(revision 6510)
+++ core.js	(working copy)
@@ -315,8 +315,7 @@
 	isXMLDoc: function( elem ) {
 		// documentElement is verified for cases where it doesn't yet exist
 		// (such as loading iframes in IE - #4833)
-		var documentElement = (elem.ownerDocument || elem).documentElement;
-		return !!documentElement && documentElement.nodeName !== "HTML";
+		return ((elem.ownerDocument || elem).documentElement || 0).nodeName !== "HTML";
 	},
 
 	// Evalulates a script in a global context

Download in other formats:

Original Format