> Put another way, given <img src="foo://www.google.com">, do you want to render
> stuff as HTML in a browser window?

Thanks for the quick response and my apologies for not being clear in
my earlier post.

In a nutshell, this is what I want to do -

I want to write a protocol handler for protocol foo:// doing the
following things -

1. Call a custom servlet on a server (using http:// protocol on a
specified port)
which will send the response back to the browser (Firefox). (I am using

foo://www.google.com just for test purposes till I look into the
details of the server implementation.)

2. Intercept the response on browser side (in the XPCOM component) to
manipulate the
response body (will be a valid HTML stream)  before rendering it into
the browser. (Right now, as the first step, I just want to intercept
the response body and then render it to the browser.)

I would like to develop this as Firefox extension.

(I get the basics of writing/registering custom protocol handler and
using stream listener
to intercept the response. The confusion I have is given below.)

> Why not just pass the data out to your listener?
>
So when the user types foo://<any URL> in the address bar, will Firefox
call
asyncOpen() on the channel provided by the custom protocol handler and
pass the browser listener ?

Since I do not have my own application, I am confused about who will
call
asyncOpen() on the channel. Or am I way off track in understanding
the basic architecture ?

I sincerely appreciate your help. 

Thanks !

 

> -Boris

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

Reply via email to