Last active
August 29, 2015 14:24
-
-
Save robin-drexler/e348376bc51be0a9cad3 to your computer and use it in GitHub Desktop.
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
<html> | |
<body> | |
<span>LocalStorage: </span> | |
<span id="localstorage-info" style="font-weight: bold"></span> | |
<script type="text/javascript"> | |
var localStorageInfoElement = document.querySelector('#localstorage-info') | |
try { | |
window.localStorage.setItem('moep', true); | |
localStorageInfoElement.textContent = 'Yep! :)'; | |
} catch(e) { | |
localStorageInfoElement.textContent = 'Nope! :('; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment