mirror of
https://github.com/MercuryWorkshop/bare-mux.git
synced 2025-05-16 15:40:01 -04:00
18 lines
636 B
TypeScript
18 lines
636 B
TypeScript
// The user likely has overwritten all networking functions after importing bare-client
|
|
// It is our responsibility to make sure components of Bare-Client are using native networking functions
|
|
|
|
export const fetch = globalThis.fetch;
|
|
export const WebSocket = globalThis.WebSocket;
|
|
export const Request = globalThis.Request;
|
|
export const Response = globalThis.Response;
|
|
export const XMLHttpRequest = globalThis.XMLHttpRequest;
|
|
|
|
export const WebSocketFields = {
|
|
prototype: {
|
|
send: WebSocket.prototype.send,
|
|
},
|
|
CLOSED: WebSocket.CLOSED,
|
|
CLOSING: WebSocket.CLOSING,
|
|
CONNECTING: WebSocket.CONNECTING,
|
|
OPEN: WebSocket.OPEN,
|
|
};
|