cxn

Network connection JavaScript module with online/offline events

Github npm Documentation

Live Output

state:

To test the offline event, unplug or disable your internet connection.
To test the online event, do the opposite.

Open the console to play with cxn in the browser.