mirror of
https://github.com/litruv/API-WebSocket-Bridge.git
synced 2026-07-24 18:56:02 +10:00
first commit
This commit is contained in:
19
node_modules/engine.io-client/build/esm-debug/transports/xmlhttprequest.browser.js
generated
vendored
Normal file
19
node_modules/engine.io-client/build/esm-debug/transports/xmlhttprequest.browser.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// browser shim for xmlhttprequest module
|
||||
import { hasCORS } from "../contrib/has-cors.js";
|
||||
import { globalThisShim as globalThis } from "../globalThis.js";
|
||||
export function XHR(opts) {
|
||||
const xdomain = opts.xdomain;
|
||||
// XMLHttpRequest can be disabled on IE
|
||||
try {
|
||||
if ("undefined" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {
|
||||
return new XMLHttpRequest();
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
if (!xdomain) {
|
||||
try {
|
||||
return new globalThis[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user