Search code examples
firefox-addonfirefox-addon-sdk

Listening for a web-based protocol handler selection


Is there a way that my add-on (currently SDK-based) can listen in for the choice by the user of a particular web-based protocol handler to find out its URL (but before this web-based protocol handler site is loaded)?


Solution

  • You could wrap nsWebHandlerApp, that is:

    1. Re-register the original component under a different name.
    2. Implement nsIHandlerApp and nsIWebHandlerApp yourself, passing calls back to an instance of the original component.
    3. Do whatever you want in your launchWithURI.