I have been playing around with webkit.net in a c# win forms project, and love how easy it is to call JavaScript functions from within the C# program with:
browser.Document.InvokeScriptMethod("functionName", new object[]{"parameter1", "parameter2"});
Now the question is how to do this the other way round... Is there some sort of event listener that can listen for a javascript function call, or any way to invoke a c# method via the JavaScript running in the webkit browser?
The way I'm doing it at the moment it using a bad hack ... having a look at the available event listeners, I hooked up to the TitleChanged
event, and read the value of a hidden input
field in the html .... this is really bad and needs an actual solution.
Thanks in advance, - Greg.