1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 14:07:58 +01:00

Fix REPL bug.

This commit is contained in:
Kris Maglione
2011-02-17 06:32:10 -05:00
parent 04b561d98f
commit 125739c29c

View File

@@ -15,11 +15,7 @@ defineModule("javascript", {
// TODO: Clean this up. // TODO: Clean this up.
var JavaScript = Module("javascript", { var JavaScript = Module("javascript", {
Local: function (dactyl, modules, window) ({
init: function () { init: function () {
this.modules = modules;
this.window = window;
this._stack = []; this._stack = [];
this._functions = []; this._functions = [];
this._top = {}; // The element on the top of the stack. this._top = {}; // The element on the top of the stack.
@@ -34,6 +30,14 @@ var JavaScript = Module("javascript", {
this._nullSandbox = Cu.Sandbox("about:blank"); this._nullSandbox = Cu.Sandbox("about:blank");
}, },
Local: function (dactyl, modules, window) ({
init: function init() {
this.modules = modules;
this.window = window;
init.supercall(this);
},
}), }),
lazyInit: true, lazyInit: true,
@@ -743,7 +747,7 @@ var JavaScript = Module("javascript", {
return this.rootNode; return this.rootNode;
}), }),
__noSuchMethod__: function (meth, args) Buffer[meth].apply(Buffer, [this.rootNode].concat(args)), __noSuchMethod__: function (meth, args) Buffer[meth].apply(Buffer, [this.rootNode].concat(args))
}); });
modules.CommandREPLMode = Class("CommandREPLMode", modules.CommandMode, { modules.CommandREPLMode = Class("CommandREPLMode", modules.CommandMode, {