mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
js: Publish the global object as "global"
This commit is contained in:
parent
9494865f99
commit
23c5323a70
1 changed files with 2 additions and 0 deletions
|
@ -204,6 +204,8 @@ int main(int argc, char** argv)
|
||||||
JS::Interpreter interpreter;
|
JS::Interpreter interpreter;
|
||||||
interpreter.heap().set_should_collect_on_every_allocation(gc_on_every_allocation);
|
interpreter.heap().set_should_collect_on_every_allocation(gc_on_every_allocation);
|
||||||
|
|
||||||
|
interpreter.global_object().put("global", &interpreter.global_object());
|
||||||
|
|
||||||
if (script_path == nullptr) {
|
if (script_path == nullptr) {
|
||||||
repl(interpreter);
|
repl(interpreter);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue