v8go icon indicating copy to clipboard operation
v8go copied to clipboard

Question: Accessing global variables after each script execution

Open mustafaakin opened this issue 2 years ago • 1 comments

I'm trying to build Jupyter-notebook like application with v8 isolates. I'm writing it in Go, but I know it's not specfic to Go, but V8 isolates.

Consider I run the following code:

let users = [1,2,3]
let mappedUsers = users.map(a => a*3)

After this execution, how can I access these variables created globally, meaning I don't know the script contents so how can I iterate them properly? This might be a debugger case, and I might be confusing some use cases, but any pointers would be appreciated.

mustafaakin avatar Jan 26 '23 19:01 mustafaakin

exec js return users return mappedUsers

silentiumNoxe avatar Mar 04 '23 22:03 silentiumNoxe