Don't send stuff before client rendered it

This commit is contained in:
2020-06-01 18:58:26 +02:00
parent d7f606a036
commit 3ee735b7f2
2 changed files with 8 additions and 4 deletions

View File

@@ -19,6 +19,7 @@
ws.onopen = function() {
console.log("Connected");
ws.send("MOAR");
}
ws.onmessage = function(e) {
@@ -33,6 +34,7 @@
li.innerText = `${ob.name} @ ${ob.x}, ${ob.y}`;
ul.append(li);
}
ws.send("MOAR");
};
</script>
</body>