When a user clicks on something in a browser control, I want
to find the corresponding DOM node. In Visual Basic with the
Internet Explorer control, I can grab the document when the
page has been loaded, and then catch events on that document,
using something like this:
Dim WithEvents doc As HTMLDocument
Private Sub WebBrowser1_DownloadComplete()
Set doc = WebBrowser1.Document
End Sub
Private Sub doc_onfocusin()
Dim elem As IHTMLElement
Set elem = doc.parentWindow.event.srcElement
Debug.Print elem.tagName
End
However, with the Mozilla control, the line
Set doc = WebBrowser1.Document
returns an error; it turns out that the object type
returned by the WebBrowser1.Document property is
IHTMLDocument2. So I changed 'doc' to use that type instead
of HTMLDocument, but VB complains that says
"Object does not source automation events"
Is there a way to get events from the document with Mozilla?
Thanks...
-- jeff
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding