Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
onmessage
Collapse the table of content
Expand the table of content

onmessage event

Fires a MessageEvent when data is received through a WebSocket connection.

Syntax

Event Property object.onmessage = handler;
addEventListener Method object.addEventListener("message", handler, useCapture)

 

Event handler parameters

handler [in]

Type: Function

Event handler to call when data is received.

Remarks

You can use this event to notify the app to process incoming data.

See also

WebSocket
WebSockets in Windows
WebSockets RFC 6455
The WebSocket API

 

 

Show:
© 2015 Microsoft