Light12306/Web12306/js/platform/storage.js

23 lines
517 B
JavaScript
Raw Normal View History

2014-03-14 18:39:06 +08:00
define(function (require) {
2014-04-30 19:20:58 +08:00
var EventObject = require("./EventObject.js");
2014-03-14 18:39:06 +08:00
var Storage = function () {
var __ = this;
this.get = function(key) {
return localStorage[key] || "";
};
this.put = function(key, value) {
localStorage[key] = value + '';
};
this.remove = function(key) {
localStorage.remove(key);
};
Object.defineProperty(this, "");
};
Storage.prototype = Object.create(EventObject);
Storage.constructor = Storage;
return Object.create(Storage);
2014-04-30 19:20:58 +08:00
});