MessageEvent
Summary
A MessageEvent is sent to clients using WebSockets when data is received from the server. This is delivered to the listener indicated by the WebSocket object’s onmessage attribute.
Properties
- html/elements/data
- The data from the server.
Methods
No methods.
Events
No events.
Examples
socket.onmessage = function (event) {
console.log(event.data);
}
Attributions
Mozilla Developer Network : Article