Wearable Only
Protected
constructorReadonly
dataThe data received from the server. For binary messages, this is of type Blob. For text messages, this is a string.
Readonly
typeThe type of the data received, text
or binary
, returned as a string.
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
Event type for WebSocket message events. This event fires when a message has been received from the server. Listen for this event by using
addEventListener
withmessage
, or by setting theonmessage
property.Example