1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-30 20:02:27 +01:00

Just use with (window) in userEval. Adding it to the prototype chain causes too much trouble.

--HG--
branch : mode-refactoring
This commit is contained in:
Kris Maglione
2010-10-07 23:35:53 -04:00
parent 248c906e9c
commit 301a8e5377
2 changed files with 3 additions and 3 deletions

View File

@@ -294,7 +294,7 @@ const Dactyl = Module("dactyl", {
if (!context)
context = userContext;
return Cu.evalInSandbox(str, context, "1.8", fileName, lineNumber);
return Cu.evalInSandbox("with (window) {" + str + "}", context, "1.8", fileName, lineNumber);
},
/**
@@ -1876,7 +1876,6 @@ const Dactyl = Module("dactyl", {
};
},
load: function () {
jsmodules.__proto__ = window;
dactyl.triggerObserver("load");
dactyl.log("All modules loaded", 3);