diff --git a/package.json b/package.json index b65762b0e..2eaefde9b 100644 --- a/package.json +++ b/package.json @@ -133,4 +133,4 @@ "test-http2": "npm run build && npm run lint && make test-node-http2" }, "unpkg": "dist/superagent.min.js" -} +} \ No newline at end of file diff --git a/src/client.js b/src/client.js index 57a15436c..dd6bff590 100644 --- a/src/client.js +++ b/src/client.js @@ -63,36 +63,11 @@ request.getXHR = () => { if ( root.XMLHttpRequest && (!root.location || - root.location.protocol !== 'file:' || - !root.ActiveXObject) + root.location.protocol !== 'file:') ) { return new XMLHttpRequest(); } - try { - return new ActiveXObject('Microsoft.XMLHTTP'); - } catch { - /**/ - } - - try { - return new ActiveXObject('Msxml2.XMLHTTP.6.0'); - } catch { - /**/ - } - - try { - return new ActiveXObject('Msxml2.XMLHTTP.3.0'); - } catch { - /**/ - } - - try { - return new ActiveXObject('Msxml2.XMLHTTP'); - } catch { - /**/ - } - throw new Error('Browser-only version of superagent could not find XHR'); };