From dfc7f8d33ab71c2479aa0b067325bb6079da0425 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 20 Jan 2011 05:51:44 -0500 Subject: [PATCH] Apply modules prototype magic earlier. Closes issue #281. --- common/content/dactyl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 128f6452..f257e023 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -2190,6 +2190,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { // TODO: we should have some class where all this guioptions stuff fits well // Dactyl.hideGUI(); + if (dactyl.userEval("typeof document", null, "test.js") === "undefined") + jsmodules.__proto__ = XPCSafeJSObjectWrapper(window); + if (dactyl.commandLineOptions.preCommands) dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); @@ -2201,9 +2204,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { let init = services.environment.get(config.idName + "_INIT"); let rcFile = io.getRCFile("~"); - if (dactyl.userEval("typeof document", null, "test.js") === "undefined") - jsmodules.__proto__ = XPCSafeJSObjectWrapper(window); - try { if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile;