【发布时间】:2022-01-27 16:52:25
【问题描述】:
我想将旧的 webBrowser API 转换为新的 webView2 API。
HtmlDocument doc = webBrowser.Document.OpenNew(false);
doc.Write(sResponse);
var resultAsString = (string)doc.InvokeScript("eval", new object[] { "window.validate" });
我该怎么做?
【问题讨论】:
-
你可以使用
NavigateToString来加载你的html字符串。
标签: c# html dom webbrowser-control webview2