mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 17:27:58 +01:00
First work towards cleaning up the commandline.js rat's nest. Don't expect any of these new interfaces to stay remotely as they are.
--HG-- branch : key-processing
This commit is contained in:
@@ -40,11 +40,15 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
this.commands["dactyl.restart"] = function (event) {
|
||||
dactyl.restart();
|
||||
};
|
||||
|
||||
styles.registerSheet("resource://dactyl-skin/dactyl.css");
|
||||
},
|
||||
|
||||
cleanup: function () {
|
||||
delete window.dactyl;
|
||||
delete window.liberator;
|
||||
|
||||
styles.unregisterSheet("resource://dactyl-skin/dactyl.css");
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
@@ -1285,6 +1289,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
*/
|
||||
trapErrors: function trapErrors(func, self) {
|
||||
try {
|
||||
if (isString(func))
|
||||
func = self[func];
|
||||
return func.apply(self || this, Array.slice(arguments, 2));
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user