You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2009/10/15 23:10:39 UTC

svn commit: r825662 - /incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js

Author: lindner
Date: Thu Oct 15 21:10:39 2009
New Revision: 825662

URL: http://svn.apache.org/viewvc?rev=825662&view=rev
Log:
SHINDIG-1194 | E7 XHR requests fail when gadgets contain a <base href="..."> tag

Modified:
    incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js

Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js?rev=825662&r1=825661&r2=825662&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js Thu Oct 15 21:10:39 2009
@@ -48,15 +48,17 @@
    * Internal facility to create an xhr request.
    */
   function makeXhr() {
-    if (window.XMLHttpRequest) {
-      return new window.XMLHttpRequest();
-    } else if (window.ActiveXObject) {
-      var x = new ActiveXObject("Msxml2.XMLHTTP");
+    var x; 
+    if (window.ActiveXObject) {
+      x = new ActiveXObject("Msxml2.XMLHTTP");
       if (!x) {
         x = new ActiveXObject("Microsoft.XMLHTTP");
       }
       return x;
     }
+    else if (window.XMLHttpRequest) {
+      return new window.XMLHttpRequest();
+    }
   }
 
   /**