aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2024-08-20 17:34:18 -0700
committerElizabeth Hunt <elizabeth@simponic.xyz>2024-08-20 17:34:18 -0700
commitb4140460014d1fc134df9127600f6da2346376e3 (patch)
tree5bee11079f3ab9e3fd5d2a68cee483c2c33557f4 /static
parent6f223d2462df5e08856fb83fd76773a8af33acf9 (diff)
downloadkennel.hatecomputers.club-b4140460014d1fc134df9127600f6da2346376e3.tar.gz
kennel.hatecomputers.club-b4140460014d1fc134df9127600f6da2346376e3.zip
init commit with base ECS and Network System
Diffstat (limited to 'static')
-rw-r--r--static/index.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/static/index.js b/static/index.js
index 2c8ed38..ad39c4f 100644
--- a/static/index.js
+++ b/static/index.js
@@ -1,5 +1,12 @@
window.onload = () => {
- console.log('from js');
- const kennelWindowEle = document.querySelector('#kennel-window');
- kennelWindowEle.innerHTML = 'rendered from static/index.js';
-}
+ const ws = new WebSocket("/ws");
+ ws.onopen = () => {
+ console.log("connected");
+ };
+ ws.onmessage = (e) => {
+ console.log(e);
+ };
+ ws.onclose = (e) => {
+ console.log("disconnected", e);
+ };
+};