Please don't CC me when replying on a mailing list... On Fri, Jan 21, 2005 at 03:23:54AM +1100, Andre Pang wrote: > Where do I find this ext-to-type-mapping category, sorry?
You'd want to use nsICategoryManager. http://lxr.mozilla.org/seamonkey/source/xpcom/components/nsICategoryManager.idl#41 > OK, I don't really mind how it gets done (whether by nsIContentHandler, > nsIURIContentListener, etc), as long as I can do it :). One > interesting thing is that I actually did get this working using a > nsIProtocolHandler Actually, now that you mention it :-) You could implement nsIContentHandler, and in handleContent open a new window. Prefix the URL with x-foo or whatever to trigger your protocol handler. You can use the "chrome" flag for openWindow to avoid wrapping it with a normal browser window, or you can just pass the flag to hide the location bar (I'm not sure what it's called currently) (This would be to avoid showing the location bar, I seem to recall that you wanted this) To open windows, see nsIWindowWatcher (http://lxr.mozilla.org/seamonkey/source/embedding/components/windowwatcher/public/nsIWindowWatcher.idl#76) Note: nsIContentHandler is not frozen and in fact may be removed soon. You can do the same using nsIURIContentListener - do it in doContent. (http://lxr.mozilla.org/seamonkey/source/uriloader/base/nsIURIContentListener.idl#67) -- _______________________________________________ Mozilla-netlib mailing list Mozilla-netlib@mozilla.org http://mail.mozilla.org/listinfo/mozilla-netlib