On 21 Feb., 10:44, Michel Gutierrez <[EMAIL PROTECTED]> wrote:
> fi wrote:
>
> well, the short answer is 'you cannot'.
>
> there are 2 options to get the content here:
>
> - from your nsIContentHandler component, you stop the transfer as soon
> as you detect your mimetype and recreate a new connection to the same
> url from a channel you created by yourself
>
> - use a nsIContentListener component rather than a nsIContentHandler.
> there you can provide your own nsIStreamListener from
> nsIContentListener.doContent method and capture the content from the
> incoming data stream.
>
> hope that helps.

Thanks so far. I need both, the incomming content and the window (i.e.
the old DOM) that issued the load request. My component(s) is(are)
supposed to load the response and use it to >modify< the old DOM, not
replace it.

It seems, that I can access  nsIDOMWindow in nsIContentHandler but the
incomming response in nsIContentListener -- and that I do not have
access to the other part. Or is there a solution? Do I need both, an
nsIContentListener to get the response and an nsIContentHandler to
process it? If I had to choose one of your options, I would prefer the
second one, i.e. use the nsIContentListener, it seems to be the better
solution.

- Andreas

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

Reply via email to