How to listen to uninstallation event in javascript from a chrome extension?

前端 未结 2 1879
余生分开走
余生分开走 2021-01-22 18:16

I\'m trying to clean some preferences files when a user uninstall my extension from chrome browser.

On google website, http://code.google.com/chrome/extensions/external_

2条回答
  •  情书的邮戳
    2021-01-22 18:54

    What they mean by that paragraph is if you are uninstalling your software that was bundled with the extension, you should manually uninstall the extension as well by removing registry entries.

    There is an uninstall event:

    chrome.management.onUninstalled.addListener(function(string id) {...});
    

    It would work for listening to other extensions being uninstalled, but catching your own uninstall with it most likely would not be possible.

提交回复
热议问题