[seam-commits] Seam SVN: r11162 - sandbox/trunk/modules/xwidgets/src/main/javascript.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Jun 16 00:41:24 EDT 2009


Author: shane.bryzak at 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();
       }
     }




More information about the seam-commits mailing list