I understand that for this on iPhone you need to catch communication requests (according to my other iPhone UIWebView Expose JavaScript question ), and you can easily do the opposite and access JavaScript from Obj-C code.
However, I would like JavaScript to call some Objective-C functions that will somehow be registered with WebKit. I assume that you can do this better than link grabbing, like on an iPhone, since on Mac OS X we have access to the full WebKit.
I want to basically do the opposite Using JavaScript from Objective-C
Update: For example, you can expose the Objective-C method in JavaScript, for example self.external.objcmethod ();
source
share