deno_core icon indicating copy to clipboard operation
deno_core copied to clipboard

How to use the .call method on JsRuntime

Open Jamzy01 opened this issue 1 year ago • 0 comments

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.

Jamzy01 avatar May 21 '24 02:05 Jamzy01