projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c6ff30
)
Define `window' and `globalEval' to work in other js environments
author
David Vázquez
<davazp@gmail.com>
Sun, 21 Apr 2013 17:29:17 +0000
(18:29 +0100)
committer
David Vázquez
<davazp@gmail.com>
Sun, 21 Apr 2013 17:29:17 +0000
(18:29 +0100)
prelude.js
patch
|
blob
|
history
diff --git
a/prelude.js
b/prelude.js
index
b62c9cf
..
38a13d7
100644
(file)
--- 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(){