Search...
onConnected( )
Adds an event handler that runs when a connection or reconnection occurs.
Description
A connection occurs on the first subscription to a channel or channel resource or when an existing connection is lost and then restored.
Authorization
Request
This endpoint does not take any parameters
Status/Error Codes
Was this helpful?
Add a connection handler
Copy Code
1import wixRealtimeFrontend from 'wix-realtime-frontend';23// ...45wixRealtimeFrontend.onConnected( () => {6 // handle connection7 $w("#disconnectedMessage").hide();8} );