Created
November 20, 2012 09:16
-
-
Save mattbontrager/4116900 to your computer and use it in GitHub Desktop.
immediately throw an error on app initialization (if connectivity is required) to prevent further errors (other unloaded CDN libraries, etc.)
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
var App = { | |
init: function(online) { | |
var self = this; | |
if (!online) { | |
alert('not connected'); | |
} | |
} | |
}; | |
$(function() { | |
App.init(navigator.onLine); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment