The component is based on the OfflineJS library and is composed by the OfflineDetectionEvents block and the IsOffline client action. There are no external dependencies.
OfflineDetectionEvents​Block that triggers OfflineDetection events based on connection changes
When to use
When an application is required to react to connection changes.
How to use
Drag the block into a different block or screen and then create a new action handler for any of the relevant events for your use case.
The 3 warning placeholders are only displayed when the ShowWarningMessage flag is set to true, meaning the triggered events will also add visual feedback. Consider changing their content and override their CSS styles to better fit your app experience.
If you need to handle the OfflineDetection events throughout the whole application, consider placing the block in the layout itself.
The events triggered by the block are:
Checks the current state of the connection, returns true if offline.
When action flows or the user interface need to be aware of the connection status.
Call the client action within action flows to query the connection status. It can also be used as a function in expressions.ATTENTION: The action requires the OfflineDetectionEvents block to be present, otherwise the OfflineJS script will not be available and the output will be true (offline) regardless of the actual state.