How can I expose an Objective-C function to JavaScript using WebKit on Mac OS X?
- by Luke
I understand to do this on the iPhone you need to trap link requests (as per my other iPhone question UIWebView Expose JavaScript) and you can easily do the reverse and access JavaScript from Obj-C code.
However, I would like to have JavaScript be able to call some Objective-C functions that would somehow be registered with WebKit. I assume that you can do this better than trapping links like on the iPhone as on Mac OS X we have access to the full WebKit.
I wish to basically do the reverse of Using JavaScript from Objective-C