I recently developed a Firefox add-on using the Add-on SDK.
The functionality of my script in Firefox is irrelevant in this context. However, I am seeking guidance on how to implement a function that triggers upon uninstall and disabling.
Although I have reviewed this Code Samples article, this resource, this documentation, and this manual along with this helpful answer, I am still struggling to successfully execute the desired command during uninstallation.
Furthermore, it appears that the provided manual may be outdated based on the warnings I received when compiling using:
cfx xpi
To address these warnings, I replaced the usage of the Components
Object with const {Cu} = require("chrome");
. Despite making this adjustment and successfully compiling the code, I have yet to achieve the execution of a command during uninstallation.
Should I consolidate all the necessary code within the main.js file? Or do I require a separate uninstall file for triggering this function?
If possible, could you please provide a concrete example demonstrating how to approach this implementation effectively?