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;