Search.../

onDisconnected( )

Adds an event handler that runs when a disconnection occurs.

Description

A disconnection can occur, for example, if there is a network issue.

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';
2
3// ...
4
5wixRealtimeFrontend.onDisconnected( () => {
6 // handle disconnection
7 $w("#disconnectedMessage").show();
8} );