Author: shane.bryzak(a)jboss.com
Date: 2009-06-16 00:41:23 -0400 (Tue, 16 Jun 2009)
New Revision: 11162
Modified:
sandbox/trunk/modules/xwidgets/src/main/javascript/xw.js
Log:
fix for chrome browser
Modified: sandbox/trunk/modules/xwidgets/src/main/javascript/xw.js
===================================================================
--- sandbox/trunk/modules/xwidgets/src/main/javascript/xw.js 2009-06-16 03:33:21 UTC (rev
11161)
+++ sandbox/trunk/modules/xwidgets/src/main/javascript/xw.js 2009-06-16 04:41:23 UTC (rev
11162)
@@ -57,7 +57,14 @@
e.language = "javascript";
e.text = req.responseText;
e.type = "text/javascript";
- document.getElementsByTagName("head")[0].appendChild(e);
+ var head = document.getElementsByTagName("head")[0];
+ if (head == null)
+ {
+ head = document.createElement("head");
+ var html = document.getElementsByTagName("html")[0];
+ html.insertBefore(head, html.firstChild);
+ }
+ head.appendChild(e);
if (callback) callback();
}
}
Show replies by date