Kirix Support Forums

JavaScript execution

Please post all general questions, comments, bug reports, and any other wxWebConnect feedback here.

JavaScript execution

Postby Gera777 on Mon Aug 09, 2010 4:30 am

In the "About wxWebConnect" it is written that it can " Execute JavaScript code directly from within a program ".
But I can't find how to do this. Maybe there is any example? Or special class?
Is there any documentation with function description.
Gera777
Registered User
 
Posts: 3
Joined: Tue Aug 03, 2010 5:04 am

Re: JavaScript execution

Postby jonmmorgan on Mon Aug 09, 2010 7:45 am

wxWebControl has a method, Execute(). This can execute a raw Javascript string.

Please note that it will not work with XULRunner 1.9.2 without some changes, and that you cannot get the result of the Javascript call (see viewtopic.php?f=25&t=828#p2336). Both of these restrictions can be lifted, but only as yet in a somewhat fragile and experimental way.
jonmmorgan
Registered User
 
Posts: 94
Joined: Fri May 14, 2010 9:48 am

Re: JavaScript execution

Postby Gera777 on Mon Aug 09, 2010 9:04 am

So now there is no way to execute JavaScript?
Gera777
Registered User
 
Posts: 3
Joined: Tue Aug 03, 2010 5:04 am

Re: JavaScript execution

Postby jonmmorgan on Thu Aug 12, 2010 9:05 am

There is a way of executing Javascript, but not in the officially supported release. You could try using the version at http://github.com/jonmmorgan/wxwebconnect/, though that is not officially supported by Kirix and can be quite difficult to get working (it is also only tested on Windows Vista with MSVC++ 2008 Express, though it probably works on other OSes).
jonmmorgan
Registered User
 
Posts: 94
Joined: Fri May 14, 2010 9:48 am

Re: JavaScript execution

Postby jonmmorgan on Tue Dec 07, 2010 9:06 am

Javascript execution and returning the result in a string is now in a much more solid state in my repository (it doesn't crash if invalid Javascript is passed to it or an exception is thrown, and it doesn't need to link to libmozjs/js3250.dll).
jonmmorgan
Registered User
 
Posts: 94
Joined: Fri May 14, 2010 9:48 am

Return to wxWebConnect Questions, Thoughts & Feedback