Fullscreen()

            // When a message comes into our WebSocket, we pass the message along
            // to the `messageReceiver` port.
            socket.addEventListener("message", function (event) {
                console.log("Message received: " + event.data);
                app.ports.messageReceived.send(event.data);
            });

            // Send a ping message every 10 seconds to keep socket alive
            pingInterval = setInterval(() => {
                if (socket.readyState === W