nsIDOMWindow->GetContentDOMWindow problem
philippe <[email protected]> Mon, 5 Dec 2011 06:13:43 -0800 (PST)
| Newsgroups | gmane.comp.mozilla.devel.embedding |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <f4c254e8-ad44-4b57-9276-f6ee448a7e33@d17g2000yql.googlegroups.com> |
I use gecko 1.9.2.23
I have an error when I use the GetContentDomWindow on a
nsIWebBrowserObject
What I do before is:
I create a browser into a window. I navigate on a page using loadURI.
The page is OK
I trap a key input and start to execute some code into my chrome when
a key is pressed.
Here is the code
nsIDOMWindow* domWindow=NULL;
rv=mWebBrowser->GetContentDOMWindow(&domWindow);
nsCOMPtr<nsIScriptGlobalObjectOwner>
theGlobalObjectOwner(do_GetInterface(domWindow));
But domWindow is NULL and rv=mWebBrowser-
>GetContentDOMWindow(&domWindow); returns 0x80004002.
What is wrong with y code. Do you have some sample ?
THank's a lot for your responses
philippe