0

I have a c# windows form application with a webkit.net embedded. Now I was wondering if I can somehow send a string message to the webpage that the application opened.

My application is basically a simple browser, I'm hoping to have a button that sends text to the opened webpage to start some JavaScript (just like how cross domain postMessage works). The target page already has the needed eventlistener.

Thanks in advance.

shinji97
  • 45
  • 5
  • [InvokeScript](http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.invokescript.aspx) – shinji97 May 13 '11 at 21:15

2 Answers2

0

you can use Watin to drive web browser user gestures, such as typing, clicking, etc. http://watin.org/

danielpops
  • 713
  • 6
  • 13
0

I took a look at the WebKit.NET sources and this should be straightforward. Your WebKitBrowser user control has a property called Document - it has a method called InvokeScriptMethod(). It should be as simple as calling it.

David Airapetyan
  • 5,301
  • 4
  • 40
  • 62