Reputation: 81
I'm developing an addon with the addon SDK (no restart).
What would be the best way to check if an addon has just been updated or installed for the first time?
I would like to open a new tab with a changelog or recent changes upon install or update (no restart).
Upvotes: 1
Views: 53
Reputation: 57661
You should use the loadReason
property:
var self = require("sdk/self");
if (self.loadReason == "install" || self.loadReason == "upgrade")
...
Upvotes: 2