mirror of
https://github.com/MercuryWorkshop/bare-mux.git
synced 2025-05-15 23:20:02 -04:00
fetch working
This commit is contained in:
commit
5355f49957
10 changed files with 904 additions and 0 deletions
18
src/snapshot.ts
Normal file
18
src/snapshot.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
// 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,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue