MultiplayerMinesweeper/www/scripts/interface/game/connection.js

14 lines
301 B
JavaScript
Raw Normal View History

export function updateConnectionStatus(connection) {
let obj = document.getElementById("status")
obj.textContent = `Server Connection: ${connection}`
switch (connection) {
case "connected":
obj.style.color = "green";
break;
case "disconnected":
obj.style.color = "red";
break;
}
}