On Thu, Jan 20, 2005 at 12:25:53AM +1100, Andre Pang wrote: > What I'm having trouble with is 'associating' the .foo extension > (really, an application/x-foo MIME type) with the chrome://fooviewer/ > application. e.g. if a user types in 'http://www.example.com/data.foo' > into their browser, I'd like the chrome to appear in the browser window > and act as a content handler/viewer for that particular MIME type.
Hm, not sure how you can do exactly that. For the extension -> type mapping, you can add an entry in the "ext-to-type-mapping" category, where the key is the extension, and the value is the mime type. A content handler (nsIContentHandler) mainly allows you to open a window or something... it doesn't really let you get the data. Maybe you can use nsIURIContentListener, and somehow get docshell to load your data, maybe via loadStream... -- _______________________________________________ Mozilla-netlib mailing list Mozilla-netlib@mozilla.org http://mail.mozilla.org/listinfo/mozilla-netlib