js: Publish the global object as "global"

This commit is contained in:
Andreas Kling 2020-03-27 12:24:58 +01:00
parent 9494865f99
commit 23c5323a70

View file

@ -204,6 +204,8 @@ int main(int argc, char** argv)
JS::Interpreter interpreter;
interpreter.heap().set_should_collect_on_every_allocation(gc_on_every_allocation);
interpreter.global_object().put("global", &interpreter.global_object());
if (script_path == nullptr) {
repl(interpreter);
} else {