}
});
-var sessionGlobal = Cu.import("resource://gre/modules/Services.jsm", {})
+var sessionGlobal = Cu.import("resource://gre/modules/Services.jsm", {});
var Storage = Module("Storage", {
Local: function Local(dactyl, modules, window) ({
},
newObject: function newObject(key, constructor, params) {
- let self = this;
if (params == null || !isObject(params))
throw Error("Invalid argument type");
if (key in this && !reload)
throw Error("Cannot add storage key with that name.");
- let load = function () self._loadData(key, params.store, params.type || myObject);
+ let load = () => this._loadData(key, params.store, params.type || myObject);
this.keys[key] = new constructor(key, params.store, load, params);
- this.keys[key].timer = new Timer(1000, 10000, function () self.save(key));
+ this.keys[key].timer = new Timer(1000, 10000, () => this.save(key));
this.__defineGetter__(key, function () this.keys[key]);
}
return this.keys[key];
}
},
-
isAbsolutePath: function isAbsolutePath(path) {
try {
services.File().initWithPath(path);
if (!(prop in File.prototype)) {
let isFunction;
try {
- isFunction = callable(file[prop])
+ isFunction = callable(file[prop]);
}
catch (e) {}
// catch(e){ dump(e + "\n" + (e.stack || Error().stack)); Components.utils.reportError(e) }
-// vim: set fdm=marker sw=4 sts=4 et ft=javascript:
+// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: