Re: nsIDOMWindow::GetDocument() returning null on FF3

"[email protected]" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <[email protected]>
I don't have the answer to your question. However, I do have an
observation or rather a question which is related. I am using FF3 as
well. What I found is the nsIDOMWindow I get from nsIWebBrowser might
now be the most current one for some reason. I understand nsIDOMWindow
changes during a load so I obtain it using a nsIWebProgressListener.
But even the one I get at the end of the progress might not be the
same one that the real DOM tree resides later on. This happens
randomly and most of them occur during the first load of a new browser
window. Note that my problem is a little bit different from yours
since I always get a non-null document out of it (just that it's not
the right one).

Does anyone know how to obtain the nsIDOMWindow in a reliable way?
Which event should I listen to? Many thanks.

Regards,

Feng

On Jan 7, 7:20 am, "Oliveiros Cristina"
<[email protected]> wrote:
> Dear all,
>
> Is it possible that this attribute returns null even though nothing wrong is reported by the return error code?
>
> NS_FAILED() returns 0.
>
> This situation never arisen on FF2 browser, but its starting to happen with ff3 on some pages....
>
> It seems that DOM Window Objects on FF3 all expose nsIDOMWindow2 interface.
> I am accessing GetDocument() through a nsIDOMWindow* pointer.
>
> Can anyone please kindly help me on this?
>
> Thanks a million in advance for your help
>
> Best,
> Oliveiros
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.