mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 23:14:12 +01:00
Replace expression closures (methods).
Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
@@ -52,14 +52,16 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
|
||||
});
|
||||
},
|
||||
|
||||
Local: function Local(dactyl, modules, window) ({
|
||||
init: function init() {
|
||||
delete this.instance;
|
||||
this.providers = {};
|
||||
},
|
||||
Local: function Local(dactyl, modules, window) {
|
||||
return {
|
||||
init: function init() {
|
||||
delete this.instance;
|
||||
this.providers = {};
|
||||
},
|
||||
|
||||
isLocal: true
|
||||
}),
|
||||
isLocal: true
|
||||
};
|
||||
},
|
||||
|
||||
parse: function parse(str) {
|
||||
if ('{['.contains(str[0]))
|
||||
@@ -246,12 +248,16 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
|
||||
return result;
|
||||
},
|
||||
|
||||
_has: function _has(name) hasOwnProperty(this.providers, name)
|
||||
|| this.storage.has(name),
|
||||
_has: function _has(name) {
|
||||
return hasOwnProperty(this.providers, name) ||
|
||||
this.storage.has(name);
|
||||
},
|
||||
|
||||
has: function has(name) [this.globalProviders, this.localProviders]
|
||||
.some(obj => isinstance(obj, ["Set"]) ? obj.has(name)
|
||||
: hasOwnProperty(obj, name)),
|
||||
has: function has(name) {
|
||||
return [this.globalProviders, this.localProviders]
|
||||
.some(obj => isinstance(obj, ["Set"]) ? obj.has(name)
|
||||
: hasOwnProperty(obj, name));
|
||||
},
|
||||
|
||||
register: function register(name, callback, long) {
|
||||
if (this.isLocal)
|
||||
|
||||
Reference in New Issue
Block a user