HTML5 WebSocket compatibility for onmessage event.

Onmessage expects a MessageEvent object, with a single attribute called "data". Also, the argument was not being used in any way, so there was no way to retrieve the data.

https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent