deno_core
deno_core copied to clipboard
How to use the .call method on JsRuntime
I was just wondering how to use the JsRuntime::call method. I can't find any decent examples online and I'm unsure how to use the method. I would expect to just pass a string of the function name, but instead it expects a reference to a Global<Function>. I can't find a way to get this Function struct though, clearly I have to somehow obtain it from the JsRuntime, but I can't figure it out. Clearly this repo is lacking in examples, which is understandable, but I would just like to know how to use this method.