shabang wrote:
theWebBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID, &rv);
So you create a new web browser. It's completely uninitialized and not hooked
up to anything.
// navigate back in the history
rv = theWebNav->GoBack();
646 NS_IMETHODIMP nsWebBrowser::GoBack()
647 {
648 NS_ENSURE_STATE(mDocShell);
Since you never initialized it, mDocShell is null. So you get
NS_ERROR_UNEXPECTED (which is 0x8000ffff).
Must I get the main browser reference instead of using
do_CreateInstance(NS_WEBBROWSER_CONTRACTID)?
Basically, yes.
And how to to that?
Pretty specific to the embedding app in question (in this case to TestGTKEmbed).
-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom