clobba / open-webkit-sharp

Automatically exported from code.google.com/p/open-webkit-sharp
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Call Javascript function from c# #106

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

If I understand correctly the way the call 
----
   WebKitBrowser.Document.InvokeScriptMethod("jscript_function", new object[]{arg1, "arg2"});
----
... is not yet implemented.

Is there another way to call Javascript function from C#?

Thank you

Original issue reported on code.google.com by prubo...@gmail.com on 11 May 2012 at 11:34

GoogleCodeExporter commented 9 years ago
Calling a function is possible by using 
<webkitbrowser>.GetScriptManager.CallFunction("name", new Object[] { arg1, 
arg2, ... }); if yoiu are using .NET 4. If you want to use .NET 2 you can use 
<webkitbrowser>.StringByEvaluatingJavaScriptFromString("name(arguments)")

Original comment by tsumalis96@gmail.com on 11 May 2012 at 4:26