From a9426a807b6ea5adc09a1eadecb7233337b5aa6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Sun, 21 Apr 2013 18:29:17 +0100 Subject: [PATCH] Define `window' and `globalEval' to work in other js environments --- prelude.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prelude.js b/prelude.js index b62c9cf..38a13d7 100644 --- a/prelude.js +++ b/prelude.js @@ -1,8 +1,13 @@ // This file is prepended to the result of compile ecmalisp.lisp, and // contain runtime code that ecmalisp assumes to exist. +var window = this; var nil; +function globalEval (x) { + return eval.call (window, x); +} + function pv (x) { return x==undefined? nil: x; } function mv(){ -- 1.7.10.4