Created
April 1, 2014 01:20
-
-
Save TravelingTechGuy/9905941 to your computer and use it in GitHub Desktop.
Check if device is online
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
window.addEventListener("offline", function(e) {alert("offline");}) | |
window.addEventListener("online", function(e) {alert("online");}) | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment