MCPcopy
hub / github.com/socketio/socket.io / newRequest

Function newRequest

packages/engine.io-client/lib/transports/polling-xhr.ts:344–361  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

342}
343
344function newRequest(opts) {
345 const xdomain = opts.xdomain;
346
347 // XMLHttpRequest can be disabled on IE
348 try {
349 if ("undefined" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {
350 return new XMLHttpRequest();
351 }
352 } catch (e) {}
353
354 if (!xdomain) {
355 try {
356 return new globalThis[["Active"].concat("Object").join("X")](
357 "Microsoft.XMLHTTP",
358 );
359 } catch (e) {}
360 }
361}

Callers 2

polling-xhr.tsFile · 0.70
xmlhttprequest.jsFile · 0.50

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected