Skip to content
Browse files

remove unneeded try's. closes #1

  • Loading branch information...
1 parent 986c873 commit 1cbb3359e272e3858090a1e601e251abf6c851cd Amir Abu Shareb committed Nov 23, 2012
Showing with 5 additions and 6 deletions.
  1. +5 −6 index.js
View
11 index.js
@@ -1,18 +1,17 @@
/**
- * Get new `XMLHttpRequest` obj.
+ * XMLHttpRequest / ActiveXObject
*
* example:
*
- * req = xhr();
+ * var req = xhr();
*
* @return {Object}
*/
module.exports = function () {
if (window.XMLHttpRequest) return new XMLHttpRequest();
- try{ return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e){}
- try{ return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e){}
- try{ return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e){}
- try{ return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e){}
+ try{ return new ActiveXObject('msxml2.xmlhttp.6.0'); } catch(e){}
+ try{ return new ActiveXObject('msxml2.xmlhttp.3.0'); } catch(e){}
+ try{ return new ActiveXObject('msxml2.xmlhttp'); } catch(e){}
};

0 comments on commit 1cbb335

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