Re: [webkit-dev] How can I call a javascript function from the hosting application
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 ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How can I call a javascript function from the hosting application
The function evaluateJavaScript()is not in my Frame.h. Do you know why? Is there some cmake options that makes it appear in the Frame class? Regards, Fred -Original Message- From: André Pedralho [mailto:apedra...@gmail.com] Sent: Friday, January 07, 2011 2:21 PM To: fredx21 Cc: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] How can I call a javascript function from the hosting application On Fri, Jan 7, 2011 at 14:35, fredx21 fred...@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) WebView-); BR, -- Andre Pedralho http://pedralho.blogspot.com/ Regards, Fred ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How can I call a javascript function from the hosting application
2011/1/10 fredx21 fred...@hotmail.com: The function evaluateJavaScript()is not in my Frame.h. Do you know why? Is there some cmake options that makes it appear in the Frame class? Hi Fred, my bad! Sorry, it is only available in the Qt port. Regards, Fred -Original Message- From: André Pedralho [mailto:apedra...@gmail.com] Sent: Friday, January 07, 2011 2:21 PM To: fredx21 Cc: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] How can I call a javascript function from the hosting application On Fri, Jan 7, 2011 at 14:35, fredx21 fred...@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) WebView-); BR, -- Andre Pedralho http://pedralho.blogspot.com/ Regards, Fred ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How can I call a javascript function from the hosting application
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. - Patrick ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How can I call a javascript function from the hosting application
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 ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
[webkit-dev] How can I call a javascript function from the hosting application
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? Regards, Fred ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] How can I call a javascript function from the hosting application
On Fri, Jan 7, 2011 at 14:35, fredx21 fred...@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@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev