javascript - How to implement a command, so it is executed when the firefox-addon is uninstalled? -
i created firefox add-on add-on sdk.
my script adds firefox, doesn't matter here. how steps implement function called on uninstall , on disabling?
i read this code samples article, this, this , this manual , this answer, didn't manage it, doesn't seem work or lacking of information add , else have program around it.
also manual seems outdated, cause when add code there , compile with:
cfx xpi
i warnings, should use const {cu} = require("chrome");
instead of components
object - did , compiled without error, still, couldnt command executed on uninstall yet.
do need write in main.js file? or need unistall file called?
can give running example on how implement this?
in main.js
, use exports.onunload
.
so, in main.js
;
exports.onunload = function(reason) { //called when add-on // uninstalled // disabled // shutdown // upgraded // downgraded };
Comments
Post a Comment