Hi, Alp Toker, Thank you so much. You are a great help. :-)
Regards and thanks Cloud -----Original Message----- From: Alp Toker [mailto:[EMAIL PROTECTED] Sent: 2007年12月27日 5:10 To: Jing Zheng Cc: [email protected] Subject: Re: how can I callback javascript function from webkit engine? Jing Zheng wrote: > hi, > > I am working on an porting application that using webkit engine to > render a html page in my application view. > > now I am stuck in the problem that I can not find a way to call > javascript function defined in html script from my application. Hi, If you're using a WebView-style port (Mac, Win, GTK+) you can access the the JSGlobalContextRef holding the global object/state and JSObjectRef representing the frame's JavaScript window object with the window-object-cleared signal/callback/event, which is raised in preparation for a new load. You can also access the JSGlobalContextRef at other times using webkit_web_frame_get_global_context() / WebFrame::globalContext() or similar. Once you have these objects, you can use the standard portable JavaScriptCore API documented here: http://developer.apple.com/documentation/Carbon/Reference/WebKit_JavaScriptC ore_Ref/index.html I'm planning to write a tutorial on this since it's a frequently asked question. Good luck! _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo/webkit-dev

