I am trying to implement a call from window.external in Angular 2 and pass a JSON as a parameter.
Here is an example similar to what I am trying to achieve:
C#
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
public class ScriptInterface
{
void callMe(string json)
{
… // Do something interesting
}
}
webBrowser1.ObjectForScripting = new ScriptInterface();
Angular 2
window.external.callMe(json);
Does anyone have any tips or suggestions on how to accomplish this?
Thank you