LoyDgIk

Results 5 comments of LoyDgIk

![IMG_20241211_080834](https://github.com/user-attachments/assets/e1e378e0-e3d1-4de4-98e1-4810d97bfc0a) I set allowEval to true, but it doesn't seem to work.

Have you tried `.compileV8Module().execute()`? This is when an error would be thrown, whereas `.executeVoid()` works without issues. I needed to use `.compileV8Module()` in `IV8ModuleResolver.resolve()` and that's how I discovered this...

``` kotlin fun resolve(runtime: V8Runtime, resourceName: String, v8ModuleReferrer: IV8Module): Any? { return when { resourceName.startsWith("/") || resourceName.startsWith("./") || resourceName.startsWith("../") -> { val parentModuleName = v8ModuleReferrer.getResourceName() val moduleRelativePath = Paths.get(parentModuleName).parent.resolve(resourceName).normalize() val...

> It's more like a JS trick as follows. > > ```java > nodeRuntime.allowEval(true); > nodeRuntime.getExecutor("const vm = require(\"node:vm\");\n" + > "const script = new vm.Script(\"eval('1+1')\");\n" + > "console.log(script.runInThisContext());\n" +...

> It's more like a JS trick as follows. > > ```java > nodeRuntime.allowEval(true); > nodeRuntime.getExecutor("const vm = require(\"node:vm\");\n" + > "const script = new vm.Script(\"eval('1+1')\");\n" + > "console.log(script.runInThisContext());\n" +...