Reputation: 10521
i have cocoa app with embed webkit, which show simple html with
<input id="first_name" type="text">
and <input id="start" type="button">
and i want this: when you click #start
button, show up a regular cocoa NSAlert with #first_name
value.
Well, i need to somehow organize a connection between html,js and cocoa.
it it possible?
Upvotes: 0
Views: 373
Reputation: 10521
it turns out that it's possible: http://developer.apple.com/mac/library/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Tasks/ObjCFromJavaScript.html
working example: http://developer.apple.com/mac/library/samplecode/CallJS/Introduction/Intro.html#//apple_ref/doc/uid/DTS10004241
Upvotes: 1