To keep it short, we talk to mainframes via TCP sockets.
While investigating browser support for our applications, for whatever reason it was decided implementing a WebSocket server was out of question. At that point, with the only option being using TCP and its unavailability in a web page context, my idea was to offer a browser extension and an accompanying native host.
Obviously it's not something I'd want to ship or maintain, but it's probably a good exercise.
The SPA uses the browser extension + the native host as proxy for the server, instead of using the typical REST APIs or WebSockets.