js-bao-wss-client / NetworkModeEvent
Interface: NetworkModeEvent
Payload of the networkMode event (client.on("networkMode", ...)).
Fired when the app changes the mode ("auto", or a pinned "online" / "offline") AND when connectivity is lost or restored. A connectivity transition reports the mode unchanged — reachability is not user intent — with isOnline recomputed and reason set to "connectivityLost" or "connectivityRestored". Key offline UI off isOnline, not off mode === "offline".
Properties
isOnline
isOnline:
boolean
The reported online state after this transition.
mode
mode:
"auto"|"online"|"offline"
reason
reason:
NetworkTransitionReason
Why the transition happened.