Created
February 22, 2013 13:28
-
-
Save asicfr/5013369 to your computer and use it in GitHub Desktop.
Capacité HTML5 du navigateur
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
// Detect html5 compliance with Modernizr | |
$rootScope.localstorageEnable = Modernizr.localstorage; | |
$rootScope.offlineEnable = Modernizr.applicationcache; | |
$rootScope.logMe("localstorage : " + $rootScope.localstorageEnable); | |
$rootScope.logMe("offline : " + $rootScope.offlineEnable); | |
if (($rootScope.offlineEnable == false) || ($rootScope.localstorageEnable == false)) { | |
toastr.error("Your browser isn't applicationCache compliant !"); | |
} else { | |
// localstorage conf and init | |
$rootScope.dataStoreKey = "dataStoreKey"; | |
$rootScope.dataStore = {}; | |
ApiStorage.init(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment