On Fri, 30 Mar 2007, Ian Bull wrote:
> I have the following code which uses the SWT embedded mozilla browser:
> nsIDOMWindow domWindow = webBrowser.getContentDOMWindow();
> nsIDOMDocumentEvent domDocumentEvent = (nsIDOMDocumentEvent)
>
> domWindow.getDocument().queryInterface(nsIDOMDocumentEvent.NS_IDOMDOCUMENTEVENT_IID);
>
> nsIDOMMouseEvent domEvent = (nsIDOMMouseEvent)
>   domDocumentEvent.createEvent("MouseEvents");
>
> The create event throws a runtime error:
> pure virtual function call, and then the entire application hangs.
>
> any ideas?

I think you should call createEvent on the object returned
by domWindow.getDocument(). That is what was queryInterfaced
to nsIDOMDocumentEvent.
I don't think these things like (nsIDOMMouseEvent) are....normal...
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to