[webkit-dev] How can I call a javascript function from the hosting application
Patrick Gansterer
paroga at paroga.com
Tue Jan 11 02:03:34 PST 2011
Hi,
Brent Fulgham:
> 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.
WinCE has no COM (or sth else) wrapper around the plain WebKit objects (yet). So you must call the WebKit methods directly.
IMHO we should move this thread to webkit-help, if there are further posts.
- Patrick
More information about the webkit-dev
mailing list