GeckoFx v22
GeckoElement element = null;
var geckoDomElement = WebBrowser1.Document.DocumentElement;
if(geckoDomElement is GeckoElement)
element = (GeckoElement)geckoDomElement ;
var innerHtml = element.InnerHtml;
但不再有InnerHtml
方法。如何从gecko Web浏览器获取源HTML?
答案 0 :(得分:3)
转换为GeckoHtmlElement而不是GeckoElement。
GeckoHtmlElement element = null;
var geckoDomElement = WebBrowser1.Document.DocumentElement;
if(geckoDomElement is GeckoHtmlElement)
{
element = (GeckoHtmlElement)geckoDomElement;
var innerHtml = element.InnerHtml;
}