From 53bbcbb5b8745e2025fe10d7f3a9ad3d7304cc54 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Sat, 21 Jan 2023 15:23:42 +0800 Subject: [PATCH] refactor --- src/eval.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/eval.js b/src/eval.js index ea0f9e8..619d55e 100644 --- a/src/eval.js +++ b/src/eval.js @@ -59,12 +59,6 @@ type Call = { type Node = ToplevelCall | Call */ -// TODO just export const Iframe_Function? -const make_function = (...args) => { - const fn_constructor = globalThis.run_window.Function - return new fn_constructor(...args) -} - const codegen_function_expr = (node, cxt) => { const do_codegen = n => codegen(n, cxt) @@ -765,7 +759,7 @@ export const eval_modules = ( } ` - const actions = make_function( + const actions = new (globalThis.run_window.Function)( 'external_imports', 'on_deferred_call', 'calltree_changed_token',