This is a discussion on Re: How to be notified when extension is uninstalling? - Mozilla ; Hello Eric. You have to define an observer to it - the hash id of the observer is "em-action-requested" you should add an observer with this id and you have those consts that responsible to the different notifications to observer ...
You have to define an observer to it - the hash id of the observer is
you should add an observer with this id
and you have those consts that responsible to the different
notifications to observer for:
in the observer definition you should ask on the uninstall method:
observe: function(aSubject, aTopic, aData)
if(aData == "item-uninstalled")
var objExtensionItem =
if(objExtensionItem.id == [YOUR_GUID_EXTENSION])
//Do whatever need to do here.
I should mention that this is work only from Firefox 1.5+ (the new api).
On 8/1/06, Eric H. Jung
> I want to delete a file when my extension is uninstalled (the file isn't in the extension's directory). How can my extension be notified and execute code when it is being uninstalled?
> dev-extensions mailing list