1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 10:44:13 +01:00

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

--HG--
extra : transplant_source : %040%D8%7E%06m%B1%04D%9E%C0wN%BF%8F%EEo%D9%14%F5
This commit is contained in:
Kris Maglione
2010-10-07 23:35:53 -04:00
parent 1c62294ef6
commit 655a48384b
2 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,8 @@
__proto__: jsmodules, __proto__: jsmodules,
get content() window.content, get content() window.content,
jsmodules: jsmodules, jsmodules: jsmodules,
newContext: newContext newContext: newContext,
window: window
}; };
modules.modules = modules; modules.modules = modules;

View File

@@ -294,7 +294,7 @@ const Dactyl = Module("dactyl", {
if (!context) if (!context)
context = userContext; 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 () { load: function () {
jsmodules.__proto__ = window;
dactyl.triggerObserver("load"); dactyl.triggerObserver("load");
dactyl.log("All modules loaded", 3); dactyl.log("All modules loaded", 3);