I'm trying to get list of elements in DOM:
private void geckoWebBrowser1_DocumentCompletedEvent(object sender, EventArgs e) {
nsIDOMHTMLDocument givenDocument = geckoWebBrowser1.Document as nsIDOMHTMLDocument;
var iframes = givenDocument.GetElementsByTagName(tagname);
var iframe = iframes.Item(0);
}
but givenDocument is always null.
I'm trying to find how to work with any of nsIDOMHTML types. Everything I've tried returned null so far.
Why do you cast to nsIDOMHTMLDocument?
You can get the .GetElementsByTagName(tagName); method from GeckoDocument as well, and this works OK without the cast.