Search code examples
javascriptobjective-ccocoawebkit

How to call an Objective-C method from Javascript in a Cocoa/WebKit app?


I have a Cocoa app that uses a WebView to display an HTML interface. How would I go about calling an Objective-C method from a Javascript function within the HTML interface?


Solution

  • This is documented at developer.apple.com.