Fix detection of whether we're in HTML. Bug 386526, r=sayrer
authorbzbarsky@mit.edu
Wed, 19 Sep 2007 18:26:14 -0700
changeset 6125 738563c88c071f1e29b5f291e16591b6e72bb91c
parent 6124 a06a67f785cdfc349b98a75f31a14942de132b72
child 6126 77ebe1d895f346e929fd4953d00594102abc0641
push idunknown
push userunknown
push dateunknown
reviewerssayrer
bugs386526
milestone1.9a8pre
Fix detection of whether we're in HTML. Bug 386526, r=sayrer
testing/mochitest/MochiKit/DOM.js
--- a/testing/mochitest/MochiKit/DOM.js
+++ b/testing/mochitest/MochiKit/DOM.js
@@ -866,20 +866,19 @@ MochiKit.Base.update(MochiKit.DOM, {
         }
     },
 
     __new__: function (win) {
 
         var m = MochiKit.Base;
         if (typeof(document) != "undefined") {
             this._document = document;
-            var kXULNSURI = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-            this._xhtml = (document.documentElement &&
-                document.createElementNS &&
-                document.documentElement.namespaceURI === kXULNSURI);
+            this._xhtml =
+	        document.createElementNS &&
+		document.createElement("testname").localName == "testname";
         } else if (MochiKit.MockDOM) {
             this._document = MochiKit.MockDOM.document;
         }
         this._window = win;
 
         this.domConverters = new m.AdapterRegistry(); 
         
         var __tmpElement = this._document.createElement("span");