1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 01:52:28 +01:00

Closes issue #661.

This commit is contained in:
Kris Maglione
2011-09-14 11:00:18 -04:00
parent 16eea3c45a
commit 89482c5c23
2 changed files with 16 additions and 9 deletions

View File

@@ -72,7 +72,9 @@ var EventHive = Class("EventHive", Contexts.Hive, {
}
return !args[0].get();
});
}
},
get wrapListener() events.closure.wrapListener
});
/**
@@ -84,14 +86,6 @@ var Events = Module("events", {
init: function () {
this.keyEvents = [];
update(this, {
hives: contexts.Hives("events", EventHive),
user: contexts.hives.events.user,
builtin: contexts.hives.events.builtin
});
EventHive.prototype.wrapListener = this.closure.wrapListener;
XML.ignoreWhitespace = true;
overlay.overlayWindow(window, {
append: <e4x xmlns={XUL}>
@@ -951,6 +945,14 @@ var Events = Module("events", {
event.preventDefault();
}
}, {
contexts: function initContexts(dactyl, modules, window) {
update(Events.prototype, {
hives: contexts.Hives("events", EventHive),
user: contexts.hives.events.user,
builtin: contexts.hives.events.builtin
});
},
commands: function () {
commands.add(["delmac[ros]"],
"Delete macros",

View File

@@ -70,7 +70,12 @@ var Modules = function Modules(window) {
var base = ModuleBase;
if (callable(args[1]))
base = args.splice(1, 1)[0];
let [, prototype, classProperties, moduleInit] = args;
prototype._metaInit_ = function () {
delete module.prototype._metaInit_;
Class.replaceProperty(modules, module.className, this);
};
const module = Class(name, base, prototype, classProperties);
module.INIT = moduleInit || {};