summaryrefslogtreecommitdiff
path: root/javascript/duktape/Window.bnd
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/duktape/Window.bnd')
-rw-r--r--javascript/duktape/Window.bnd9
1 files changed, 7 insertions, 2 deletions
diff --git a/javascript/duktape/Window.bnd b/javascript/duktape/Window.bnd
index 95b55b2e2..fee5d2105 100644
--- a/javascript/duktape/Window.bnd
+++ b/javascript/duktape/Window.bnd
@@ -31,9 +31,14 @@ init Window("struct browser_window *" win, "struct html_content *" htmlc)
prototype Window()
%{
+#define EXPOSE(v) \
+ duk_get_global_string(ctx, #v); \
+ duk_put_prop_string(ctx, 0, #v)
/* steal undefined */
- duk_get_global_string(ctx, "undefined");
- duk_put_prop_string(ctx, 0, "undefined");
+ EXPOSE(undefined);
+ EXPOSE(eval);
+ EXPOSE(Object);
+#undef EXPOSE
%}
getter Window::document()