What I would like is a built in way which would allow sending messages through normal Defold means to the HTML5 socket, and allow the JS running on the page get messages, and be able to send them back. A process could be that the Defold game sends a message to the HTML5 socket. Our custom JS on the page can set up accepting messages, get the messages following Defold message passing patterns, and then know whatever address to send messages back to. Then we can decide what to do with the messages on the JS side, and have a cleaner way to communicate between the two.