Created
January 14, 2021 15:25
-
-
Save lhsazevedo/b356f85a79fb06b9723087c0c0a753e3 to your computer and use it in GitHub Desktop.
Window online and offline events test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('offline', function () { | |
console.log('We are offline') | |
}) | |
window.addEventListener('online', function () { | |
console.log('We are online') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment