<!doctype html>
<html>
  <head>
    <script type="text/javascript">
      window.buttonEl;
      window.outputEl;

      function handleListen() {
        const socket = new WebSocket("ws://localhost:3000/ws");
        window.buttonEl.setAttribute("hidden", "true");

        socket.addEventListener("message", (event) => {
          try {
            const data = JSON.parse(event.data);

            if (!data.hasOwnProperty("type")) {
              window.outputEl.innerHTML += `<p>${data.from} says to ${data