title: Using WebKit.NET to call a C# function from JavaScript
body: <p>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:</p>
  
  <p><code>browser.Document.InvokeScriptMethod("functionName", new object[]{"parameter1", "parameter2"});</code></p>
  
  <p>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?</p>
  
  <p>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 <code>TitleChanged</code> event, and read the value of a hidden <code>input</code> field in the html .... this is really bad and needs an actual solution.</p>
  
  <p>Thanks in advance,
   - Greg.</p>