[webkit-dev] How can I call a javascript function from the hosting application

Brent Fulgham bfulgham at gmail.com
Mon Jan 10 22:00:15 PST 2011


Hi Patrick,

On Jan 10, 2011, at 12:37 PM, Patrick Gansterer wrote:

> André Pedralho:
>> Hi Fred, my bad! Sorry, it is only available in the Qt port.
> 
> If you have a look at the Qt port you see the following:
> 
> JSC::JSValue v = d->frame->script()->executeScript(ScriptSourceCode(scriptSource)).jsValue();
> 
> There's a Frame::script() method where get the ScriptController.

I'm not that familiar with the Windows CE port, but in the regular Windows version you can access the script object via COM interface pointers.  The project I link on my blog (http://whtconstruct.blogspot.com/2009/06/calljs-updated.html) shows some examples of using this.

-Brent



More information about the webkit-dev mailing list