Navigating the browser | [ << Previous | Contents | Next >> ] |
This snippet will cause a URL to be loaded by Gecko. The contents will be rendered in the window you just setup. #include "nsIWebNavigation.h" nsCOMPtr<nsIWebNavigation> webNav = do_QueryInterface(webBrowser); // Load a URI. rv = webNav->LoadURI( NS_LITERAL_STRING("www.mozilla.org"), LOAD_FLAGS_NONE, nsnull, nsnull, nsnull); // referrer, postdata & headers if (NS_FAILED(rv)) return rv; |