ts.sendMessage.subscribe(function (message) {
            if (!socket) {
                return
            }
            // console.log("Sending message: " + message);
            socket.send(message);
        });

        // Handle emoji element DOM creation and animation in vanilla JS as the Elm virtual DOM gets quite intricate 
        // Preserve websocket -> Elm -> port round trip in case the Elm application wants to do additional work with
        // receieved emojis
        app.ports.addAnimatedEmoj