Re: why nsIWebNavigation::GetDocument( ) always NULL?

2004-07-19 Thread yueweng
Boris Zbarsky <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> yueweng wrote:
> >   webNav->GetDocument(getter_AddRefs(domDocument));
> 
> What's the return value of this call?
> 
> -Boris

Thanks, I found my problem already, the solution to get a DOM Window
is to use aWebProgress:

void 
nsSampleImpl::StateDocumentStop(nsIWebProgress* aWebProgress,
nsIRequest *aRequest,
PRUint32 progressStateFlags,
nsresult aStatus)
{
/*
 * The following code modify based on 
 * mozilla\toolkit\components\passwordmgr\base\nsPasswordManager.cpp
 */
nsCOMPtr domWin;
nsresult rv = aWebProgress->GetDOMWindow(getter_AddRefs(domWin));
if (!domWin)
{
return;
}

yueweng
___
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding


Re: why nsIWebNavigation::GetDocument( ) always NULL?

2004-07-19 Thread Boris Zbarsky
yueweng wrote:
  webNav->GetDocument(getter_AddRefs(domDocument));
What's the return value of this call?
-Boris
___
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding