将awesomium webview转换为String

时间:2014-01-13 14:07:51

标签: awesomium

我是awesomium的新手,我只想使用webview加载页面并将当前文档转到sting

webView.Source = New Uri("http://www.google.com")

1 个答案:

答案 0 :(得分:1)

// somewhere in your code that initializes your webView...
webView.LoadingFrameComplete += new FrameEventHandler(WebView_LoadFramingComplete);


private void WebView_LoadFramingComplete(object sender, FrameEventArgs e)
{
    if (e.IsMainFrame)
    {
        JSValue html = view.ExecuteJavascriptWithResult("document.getElementsByTagName('html')[0].innerHTML");
     }
}