On Fri, Jan 21, 2005 at 03:56:39PM +1100, Andre Pang wrote: > typed the http://www.example.com/data.foo URL, i.e. I'm trying to look > like a plugin. From a webpage author's point of view, I kind of want > to "redirect" <http://example.com/data.foo> to > <chrome://fooview/content/fooview.xul?http://example.com/data.foo>, but > still have the location bar to still display the original > <http://example.com/data.foo> URL.
Oh, I see... we don't really have a good way to do this. What you can maybe do is: Implement a stream converter (nsIStreamConverter) that converts from application/x-foo to application/vnd.mozilla.xul+xml. In its OnStartRequest, it could create a channel for the chrome:// URL of your viewer, and give it the stream listener you got in asyncConvert. Your OnDataAvailable and OnStopRequest implementations would do nothing. It's kinda hacky... and I'm unsure whether you get chrome privileges with that. To get the content URL, you may need to use document.location.href itself, instead of parsing the URL and finding a ?. it'd be nice if there was a better way to do this... -- _______________________________________________ Mozilla-netlib mailing list Mozilla-netlib@mozilla.org http://mail.mozilla.org/listinfo/mozilla-netlib