In my firefox extension onUninstalled event doesn't seem to fire

Firefox 4 provides some events to detect when a user uninstalls an extension. I can get onUninstallingto start (when the user clicks to remove the extension), but I can’t do anything when it works onUninstalled(what should happen after the restart).

Components.utils.import("resource://gre/modules/AddonManager.jsm");
AddonManager.addAddonListener({
    onUninstalled: function(addon){
        //does not work
        alert("uninstalled!");
    },
    onUninstalling: function(addon){
        //works as expected
        alert("uninstalling!");   
    }
  });

Ultimately, I hope to show the page after the user disables my extension. I would rather do it after onUninstalled, if I could.

+3
source share
1 answer

onUninstalled , - , . , , . catch - , . , , , . , Firefox , , .

, "" , onUninstalling, , ( ). (, , . https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions), , uninstall() bootstrap.js , . , : http://adblockplus.org/blog/how-many-hacks-does-it-take-to-make-your-extension-install-without-a-restart

+4

All Articles