title: Embedded Webkit - script callbacks how?
body: <p>On windows, when the "Shell.Explorer" ActiveX control is embedded in an application it is possible to register an "external" handler - on object that implements IDispatch, such that scripts on the web page can call out to the hosting application.</p>
  
  <pre><code>&lt;button onclick="window.external.Test('called from script code')"&gt;test&lt;/button&gt;
  </code></pre>
  
  <p>Now, ive moved to Mac development and thought I could get something similar working from WebKit embedded in my Cocoa application. But, there really doesn't seem to be any facility to allow scripts to call back out to the hosting application.</p>
  
  <p>One piece of advice was to hook <code>window.alert</code> and get scripts to pass a formatted message string as the alert string.
  Im also wondering if WebKit can perhaps be directed to an application hosted NPAPI plugin using NPPVpluginScriptableNPObject.</p>
  
  <p>Am I missing something? Is it really this hard to host a WebView and allow scripts to interact with the host?</p>