blob: da4083e0ed787a4315f700290f9009f820832793 (
plain)
1
2
3
4
5
6
7
8
9
|
document.addEventListener("DOMContentLoaded", async () => { "use strict"
const $ = s => document.querySelector(s);
const sock = new WebSocket(`ws://${location.host}/ws`);
sock.onmessage = e => console.log("sock", e);
sock.onopen = () => sock.send("yay");
});
|