[Project_owners] nsIWebProgressListener question
myk at melez.com
Fri Jun 16 18:53:07 EDT 2006
Eric H. Jung wrote:
> Is there any way to correlate the new nsIRequest to the original
> nsIRequest? Maybe there's another way to correlate redirects to the
> original URL if not with nsIWebProgressListener?
You can replace docShell.notificationCallbacks with your own
implementation of nsIChannelEventSink. Then your implementation will
receive onChannelRedirect calls that pass both the old and the new channels.
Just make sure to delegate to the original object when
notificationCallbacks gets QIed to any other interface, since it
implements a number of important ones. You should probably also call
the onChannelRedirect method of the original object as well after your
implementation is done doing whatever it needs to do.
More information about the Project_owners