gfse: show an informative error message in browsers that lack support for localStorage

This commit is contained in:
hallgren
2012-03-29 14:11:38 +00:00
parent 0f04d88903
commit a519d01754
2 changed files with 15 additions and 3 deletions

View File

@@ -2,6 +2,14 @@
// Grammars are stored locally in the browser using localStorage.
// See http://diveintohtml5.info/storage.html
function supports_html5_storage() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
return false;
}
}
var local={
prefix:"gf.editor.simple.grammar",
get: function (name,def) {