-
Hi, my task is to make a native api accessible via js. I start by registering all functions to a single catch-all method.
This works; however without function name in the callback i dont know how to proceed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Well Jint can also automatically wrap you object instance as exposed item, Or could also create separate wrapper c# class that call the API you want which gives you more possibilities for exposed API, then pass that to Jint. class TypeToExpose
{
private LibraryType myLib = new();
public bool SendEmail(string email, string body)
{
myLib.SendEmail(new EmailAddress(email), new Body(body));
return true;
}
} The repo has a lot of interop tests that you can explore. |
Beta Was this translation helpful? Give feedback.
for your option 2