Steve,
Is there a place, where i can find all topics for observers which are used 
in FF?

and in which Gecko browsers this code will work?
-- 
With Best Regards,
Anatoly Kaverin,
VerificationEngine team
Comodo CA Limited
MSN ID: [EMAIL PROTECTED]
http://www.vengine.com http://www.comodo.com
"steve.lu" <[EMAIL PROTECTED]> ???????/???????? ? ???????? ?????????: 
news:[EMAIL PROTECTED]
> Jon Roig wrote:
>> How can I tell if the current page a user is looking at is fully
>> loaded? (In Firefox, from an extension....)
>>
>>   -- jon
>>
>> --
>> jon roig
>> web developer
>> http://jonroig.com
>> _______________________________________________
>> dev-tech-xpcom mailing list
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-tech-xpcom
>>
>>
>>
>
> This code will do the job.
>
> NS_IMETHODIMP DOMPilot::Observe(nsISupports *aSubject, const char *aTopic, 
> const PRUnichar *aData)
> {
>    nsCOMPtr<nsIObserverService> observerService;
>    rv = servMan->GetServiceByContractID( 
> "@mozilla.org/observer-service;1",
>                                    NS_GET_IID(nsIObserverService),
>                                    getter_AddRefs(observerService));
>        if (NS_SUCCEEDED(rv))
>        {   observerService->AddObserver(this, "xpcom-shutdown", PR_TRUE);
>            observerService->AddObserver(this, "EndDocumentLoad", PR_TRUE);
>        }
>
>
>    if (strcmp(aTopic, "EndDocumentLoad") == 0)
>    {
>        nsCOMPtr<nsIDOMWindow> topWindow(do_QueryInterface(aSubject));
>        nsCOMPtr<nsIDOMDocument> doc;
>        topWindow->GetDocument(getter_AddRefs(doc));
>
>        nsCOMPtr<nsIDOMElement> relem;
>        doc->GetDocumentElement(getter_AddRefs(relem));
>    }
> }
>
> Steve
>
> 


_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to