no guide.
here's the gist. if this doesn't help, please let me know.
nsIDocumentLoaderObserver was depricated almost a year ago, and nsIWebProgressListener
took it's place.
To register your nsIWebProgressListener you can...
...get the nsIDocumentLoader service (soon to be removed in favor of an equiv), QI
that to nsIWebProgress, and register w/ nsIWebProgress. This registration is global
and will give you progress for *all* requests going through the docLoader.
it's noisy. if you can, register using the next method.
...get a nsIWebBrowser (preferred/public way), and register via it's
AddBrowserListener() method.
...get a docshell (private, for internal use only), and GI to nsIWebProgress and
register w/ it.
...you might be able to GI to nsIWebProgress from a nsIDOMWindow too; I don't recall
:-/.
The last three "window level" registration mechanisms will give you progress for
requests generated from those windows, and any sub windows/frames that get created.
They provide more "focused" progress.
Method callback translation looks like this...
nsIDocumentLoaderObserver method -> nsIWEbProgressListener method (I'm offline right
now so don't have access to the exact method names; sorry)
OnDocumentStart() -> OnStateChange()-STATE_IS_DOCUMENT & STATE_START
OnDocumentEnd() -> OnStateChange()-STATE_IS_DOCUMENT & STATE_STOP
OnURIStart() -> OnStateChange()-STATE_IS_REQUEST & STATE_START
OnURIEnd() -> OnStateChange()-STATE_IS_REQUEST & STATE_STOP
Those are really the only translations I came across, hopefully you get the idea from
this though. Full nsIWebBrowserListener documentation doesn't exist AFAIK. rpotts
knows how all the methods get fired.
I hope this helps,
Jud
Ed Burns wrote:
> Hi,
>
> Can someone please post a guide to go from using
> nsIDocumentLoaderObserver to the "current way"? Webclient and JavaDOM
> are broken by this:
>
>
><http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=nsIDocumentLoaderObserver.idl&filetype=match&who=&whotype=match&sortby=Date&h
> --
> Remove REMOVE_THIS from email address before replying.
> These are my views, and may not be the same as Sun Microsystems Inc.