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
let bound_function = exports_js_object
.get(&export_name).to_function().unwrap().get("bind").to_function().unwrap().call(&[JsValue::Int(4).into()]);
This code executes just fine as in the unwraps do not panic, but bound_function is an exception and when I dump the error it essentially says this: TypeError: not a function at bind (native).
I am trying to pass some dynamic data into a function created dynamically in Rust, and it seems the only way I can really do this is through the this_val, thus I am trying to set it. A closure will not work because of a wasmwedge-quickjs assertion that seems to panic whenever the JsFunction closure captures any of its environment.
The text was updated successfully, but these errors were encountered:
Here's some example code:
This code executes just fine as in the unwraps do not panic, but
bound_function
is an exception and when I dump the error it essentially says this:TypeError: not a function at bind (native)
.I am trying to pass some dynamic data into a function created dynamically in Rust, and it seems the only way I can really do this is through the
this_val
, thus I am trying to set it. A closure will not work because of a wasmwedge-quickjs assertion that seems to panic whenever theJsFunction
closure captures any of its environment.The text was updated successfully, but these errors were encountered: