开发者

Mono.Webkit (webkit-sharp), access c# objects, functions from javascript

I wrote a simple Gt开发者_如何学运维k Application with a Webkit Browser Widget (WebView) included. I want to access C# Objects (or C# functions) with Javascript in this Application.


I'm not sure if this is satisfiable as it's not the direct access, but you can 'access' C# objects and methods this way: Create class that extends WebView, and overwrite OnResourceRequestStarting() method to catch javascript ajax requests. You can use them as a method calls from js. As an answer to those requests, you can call WebView.ExecuteScript() and pass some parameters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜