Skip to content
Browse files

XMLHttpRequest instance generation modded to work on IE6 too

  • Loading branch information...
1 parent 7c74c6a commit e452fef42d5e473f068968a1e53587ba8d62350a @choan choan committed Oct 8, 2008
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/ajax.js
View
5 src/ajax.js
@@ -30,7 +30,7 @@ JsUnitTest.ajax = function( options ) {
};
// Create the request object
- var xml = new XMLHttpRequest();
+ var xml = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest();
// Open the asynchronous POST request
xml.open(options.type, options.url, true);
@@ -118,5 +118,4 @@ JsUnitTest.ajax = function( options ) {
return data;
}
-}
-
+};

0 comments on commit e452fef

Please sign in to comment.
Something went wrong with that request. Please try again.