storage.session¶
webix.storage.
session
¶webix.storage.session helper.
Please look into the linked official documentation.
External references¶
Code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | webix.storage.session = {
put:function(name, data){
if(name && window.JSON && window.sessionStorage){
window.sessionStorage.setItem(name, window.JSON.stringify(data));
}
},
get:function(name){
if(name && window.JSON && window.sessionStorage){
var json = window.sessionStorage.getItem(name);
if(!json)
return null;
return webix.DataDriver.json.toObject(json);
}else
return null;
},
remove:function(name){
if(name && window.JSON && window.sessionStorage){
window.sessionStorage.removeItem(name);
}
},
clear:function(){
window.sessionStorage.clear();
}
};
|