Fires when a WebSocket is connected.
|Event Property||object.onopen = handler;|
|addEventListener Method||object.addEventListener("open", handler, useCapture)|
Event handler parameters
- handler [in]
Event handler to call when a WebSocket connect is made.
This event fires only when a connection is made. To determine if a connection is still open, use readyState. If you provide a protocol when opening a WebSocket, it is recommended that the app check the protocol property to ensure the protocol was accepted by the server.