Emulation of upgrading process for Embedded webextension


(Rustam) #1

Hello. Is there any way to emulate upgrading process for Embedded webextension?


(YFdyh000) #2

What do you want to emulate? You can install add-ons, new profile or refresh the Firefox to clear the data, use each release versions on http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/.

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions


(Rustam) #3

I need to create upgrade behavior. So browser.runtime.onInstalled with reason update will be fired


(Juraj Masiar) #4

I need this too. Is there a way to simulate upgrade of extension?


(Martin Giger) #5

If you do not have an embedded WebExtension, you can simply simulate this by installing a newer version with about:debugging.


(Juraj Masiar) #6

Thank you.
I will test this next time.
I realized my use-case actually requires running code only in some upgrades (when I upgrade my data-structure) so I’m using now the technique with storing “dataVersion” value in storage.