Reputation: 4201
I keep some user data in simple-storage
. When the user uninstalls the add-on I want to remove this user data. Is there some event or something similar?
Upvotes: 6
Views: 372
Reputation: 16508
This will work in every file:
require("sdk/system/unload").when(function(reason) {
if (reason == "uninstall") {
// do uninstall stuff..
}
});
Upvotes: 5
Reputation: 37228
Try this:
exports.onUnload = function(reason) {
//do stuff for unload here
}
Upvotes: 2