[webkit-dev] how can I callback javascript function from webkit engine?

rahulsundar cpb738 at motorola.com
Mon Oct 20 22:02:12 PDT 2008

Hi Alp Toker

I am involved in porting webkit. I was testing a .js file with some
callback. The file parsing is success and the script is executing fine. But
when I press some key the function in the .js file should be invoked. But it
wasnt working. Can u brief me, where exactly in Javascript to debug on this. 

- Sundar

Cloud zheng wrote:
> Hi, Alp Toker,
> Thank you so much. You are a great help. :-)
> Regards and thanks
> Cloud 
> -----Original Message-----
> From: Alp Toker [mailto:alp at atoker.com] 
> Sent: 2007年12月27日 5:10
> To: Jing Zheng
> Cc: webkit-dev at lists.webkit.org
> 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
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev

View this message in context: http://www.nabble.com/how-can-I-callback-javascript-function-from-webkit-engine--tp14494321p20083486.html
Sent from the Webkit mailing list archive at Nabble.com.

More information about the webkit-dev mailing list