mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-12 22:00:02 -04:00
websocket progress
This commit is contained in:
parent
cf5d378147
commit
e5d51e0868
4 changed files with 74 additions and 8 deletions
|
@ -157,6 +157,16 @@
|
|||
}
|
||||
|
||||
(window as any).bare = new BareClient();
|
||||
(window as any).myWsTest = () => {
|
||||
const ws = ((window as any).ws = (
|
||||
(window as any).bare as BareClient
|
||||
).createWebSocket("wss://ws.postman-echo.com/raw", [], {}));
|
||||
ws.onopen = () => console.log("onopen");
|
||||
ws.addEventListener("open", () => console.log("open listener"));
|
||||
ws.onclose = () => console.error(new Error("onclose"));
|
||||
ws.addEventListener("close", () => console.log("close listener"));
|
||||
ws.onmessage = console.log;
|
||||
};
|
||||
</script>
|
||||
|
||||
{#if ready}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue