Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

remove unneeded try's. closes #1

  • Loading branch information...
commit 1cbb3359e272e3858090a1e601e251abf6c851cd 1 parent 986c873
amir abu shareb authored

Showing 1 changed file with 5 additions and 6 deletions. Show diff stats Hide diff stats

  1. +5 6 index.js
11 index.js
... ... @@ -1,18 +1,17 @@
1 1
2 2 /**
3   - * Get new `XMLHttpRequest` obj.
  3 + * XMLHttpRequest / ActiveXObject
4 4 *
5 5 * example:
6 6 *
7   - * req = xhr();
  7 + * var req = xhr();
8 8 *
9 9 * @return {Object}
10 10 */
11 11
12 12 module.exports = function () {
13 13 if (window.XMLHttpRequest) return new XMLHttpRequest();
14   - try{ return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e){}
15   - try{ return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e){}
16   - try{ return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e){}
17   - try{ return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e){}
  14 + try{ return new ActiveXObject('msxml2.xmlhttp.6.0'); } catch(e){}
  15 + try{ return new ActiveXObject('msxml2.xmlhttp.3.0'); } catch(e){}
  16 + try{ return new ActiveXObject('msxml2.xmlhttp'); } catch(e){}
18 17 };

0 comments on commit 1cbb335

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