websocket comm per json now

This commit is contained in:
2020-12-06 21:21:51 +01:00
parent c4746d2306
commit ebf7878397
3 changed files with 48 additions and 10 deletions

View File

@ -37,6 +37,9 @@
if (event.data == "reload") {
location.reload(true);
}
else if (event.data.startsWith("start game: ")) {
let names = "..."
}
else {
alert('unknown command: '+event.data);
}