mirror of
https://github.com/litruv/API-WebSocket-Bridge.git
synced 2026-07-25 03:06:03 +10:00
first commit
This commit is contained in:
23
node_modules/engine.io-client/build/cjs/transports/xmlhttprequest.browser.js
generated
vendored
Normal file
23
node_modules/engine.io-client/build/cjs/transports/xmlhttprequest.browser.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
// browser shim for xmlhttprequest module
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.XHR = void 0;
|
||||
const has_cors_js_1 = require("../contrib/has-cors.js");
|
||||
const globalThis_js_1 = require("../globalThis.js");
|
||||
function XHR(opts) {
|
||||
const xdomain = opts.xdomain;
|
||||
// XMLHttpRequest can be disabled on IE
|
||||
try {
|
||||
if ("undefined" !== typeof XMLHttpRequest && (!xdomain || has_cors_js_1.hasCORS)) {
|
||||
return new XMLHttpRequest();
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
if (!xdomain) {
|
||||
try {
|
||||
return new globalThis_js_1.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
}
|
||||
exports.XHR = XHR;
|
||||
Reference in New Issue
Block a user