MeLight
MeLight

Reputation: 5565

How to recognize an update from XUL to Jetpack?

We're updating our Firefox add-on. The current one the users have is built using the old XUL technology, the new extension is built with Jetpack (add-on SDK). Is there a way to tell that a XUL add-on was installed prior to the Jetpack one (they have the same ID)?

In other words, we need to trigger an update event when add-on changes from XUL to the newer Jetpack version. Can that be done?

Upvotes: 1

Views: 29

Answers (1)

Noitidart
Noitidart

Reputation: 37238

Your main function has an argument.

exports.main(reason) {
    console.log('reason:', reason);

}

The reasons are: https://developer.mozilla.org/en-US/Add-ons/Bootstrapped_extensions#Reason_constants

Upvotes: 0

Related Questions