windows phone 8.1 webview加载文档源码

windows phone 8.1 webview loaded document source code

我需要在 webview 上获取 "loaded" 网页的源代码。有什么办法吗?

我在 Windows 表格申请上试过了。我可以用这个轻松获取数据:

webBrowser1.Document.Body.InnerText

但是在 windows phone 8.1 中我不能这样做。

使用 InvokeScriptAsync 方法。

string html = await webBrowser1.InvokeScriptAsync("eval", new string[] { "document.documentElement.outerHTML;" });

答案基于Can I get the current HTML or Uri for the Metro WebView control?