You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// other codelet res = worker.execute_script_with_return("test",r#" console.log("123"); console.log(Deno); 1+1; "#,);let v1 = res.unwrap().into_raw();unsafe{// Create a new Isolate and make it the current one.let isolate = &mut v8::Isolate::new(v8::CreateParams::default());// Create a stack-allocated handle scope.let handle_scope = &mut v8::HandleScope::new(isolate);// Create a new context.let context = v8::Context::new(handle_scope);// Enter the context for compiling and running the hello world script.let scope = &mut v8::ContextScope::new(handle_scope, context);println!("{:?}", v1.as_ref().to_string(scope).unwrap().to_rust_string_lossy(scope));}// other code
The text was updated successfully, but these errors were encountered:
Now, the
execute_script
:I want to get the value from
execute_script
function. Maybe we could add a function like this:Then:
The text was updated successfully, but these errors were encountered: