Closed Bug 340333 Opened 14 years ago Closed 5 months ago
Need API for adding/removing MIME types and protocols for which Firefox is the default handler
An extension that adds support for BitTorrent torrent files, a new image format, the irc: protocol, etc. should be able to make Firefox the default handler for those types, in a cross-platform way that mimics what we do for other MIME types and protocols.
Does this differ for XP vs. Vista? I thought there was already a bug on handling this properly in Vista at least...
It probably differs for XP-vs-Vista, but it certainly differs for XP-vs-OS X and so forth. An extension author adding support for .torrent or irc: should have a cross-platform way to have Firefox be registered for those just as it is (optionally) for .html and http:.
this isn't a vista bug per se. removing blocks bug. Also, how is this different from the preference support of: network.protocol-handler.external. network.protocol-handler.app.
No longer blocks: 352420
If I understand correctly, this old bug hinders Firefox from being a useful tool for dozens of file types, and cripples the functionality of add-ons even while WebAssembly empowers them to view other image formats (e.g. bug 18574, 768 comments :-) ), play MIDI files, view music notation, run DOS executables, etc. For example, the Tiff Viewer add-on https://addons.mozilla.org/en-US/firefox/addon/tiff-viewer/ lets you view TIFF files on the web in Firefox. But if you double-click a local .TIF file in the O.S.'s file browser, or choose Open with ... > Firefox in the O.S.'s file browser, or download a tiff file then later click it in Firefox's view of downloaded files, or File > Open a local .TIF file, Firefox doesn't know that it can handle the file. I complained to the developer of Tiff Viewer https://addons.mozilla.org/en-US/firefox/addon/tiff-viewer/reviews/893266/, and Jonas Schubert Erlandsson replied "I did look into it and extensions can not register file handlers, only applications can do that and applications can not do some of the other things that this extension needs, like intercept page requests." But... the pdf.js viewer extension built into Firefox can do all this! As a user I see it adds a "Preview in Firefox" choice to Preferences > General > Applications > Portable Document Format (PDF), and all of the use cases I mention above just work. ==> If it is in fact possible for third-party add-ons to do what pdf.js does to handle a mime type, then MDN needs to document it; ==> If it isn't possible, some Web extension interface(s) should be developed (and perhaps this bug's Product should be changed to WebExtensions). (I had thought this capability was related to Navigator.registerContentHandler(); I hope not since it is now marked obsolete in https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerContentHandler ) I hope it's OK I added the WebExtensions product manager to the cc list. *Thanks* for all that y'all do!
Component: Shell Integration → General
Product: Firefox → WebExtensions
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.