mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
storage.js: Directly use scope window
to access localStorage
This commit is contained in:
parent
95dee43f5b
commit
03fc052749
@ -66,7 +66,7 @@
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
set: function(key, value) {
|
set: function(key, value) {
|
||||||
localStorage.setItem(this.prefixKey(key), JSON.stringify(value));
|
window.localStorage.setItem(this.prefixKey(key), JSON.stringify(value));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,7 +77,7 @@
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
get: function(key) {
|
get: function(key) {
|
||||||
return JSON.parse(localStorage.getItem(this.prefixKey(key)));
|
return JSON.parse(window.localStorage.getItem(this.prefixKey(key)));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,7 +88,7 @@
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
remove: function(key) {
|
remove: function(key) {
|
||||||
localStorage.removeItem(this.prefixKey(key));
|
window.localStorage.removeItem(this.prefixKey(key));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user