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

André Pedralho apedralho at gmail.com
Fri Jan 7 11:20:36 PST 2011


On Fri, Jan 7, 2011 at 14:35, fredx21 <fredx21 at hotmail.com> wrote:
> My application is hosting a WebView instance to render its GUI using the
> Windows CE port of Webkit.
>
>
>
> I need to be able to call some JavaScript functions that are written into
> the loaded HTML page. For example, I have an Init(backgroundColor) function
> that needs to be called once the page is loaded. I guess calling a
> JavaScript function is trivial, but I did not find an answer to my question
> yet.
>
>
>
> Can anyone give me pointer on how I can call a JavaScript function from the
> hosting application?
>
http://doc.qt.nokia.com/4.7-snapshot/qwebframe.html#evaluateJavaScript

WebView->page()->mainFrame()->evaluateJavaScript("Init(backgroundColor)");

BR,

--
Andre Pedralho
http://pedralho.blogspot.com/

>
>
> Regards,
>
> Fred
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>


More information about the webkit-dev mailing list