RegisterJsObject CefSharp not working

I have this problem with CefSharp and js post. This is my structure. In my MainWindow.xaml.cs I have:

chromium = new CefSharp.Wpf.ChromiumWebBrowser();
chromium.RegisterJsObject("jsInterface", new jsMapInterface());

where jsMapInterface is an open class with its methods.

In my html / js folder, I call the C # method with:

window.jsInterface.myTest();
//jsInterface.myTest();  //I have tested twice

where myTest () is the method inside the jsMapInterface class , but nothing happens. Where is my mistake?

Thanks, I advise.

+4
source share
2 answers

, , ... , ... , , new jsMapInterface(), /.

0

All Articles