Using new webextension API

I changed my extension to use a new webextension feature (bugzilla) which means that it’s only compatible with Firefox 62 and upwards. I’m now wondering how I’m supposed to publish it since I still want users to be able to easily use the old version.

One way would be to make my extension backwards-compatible, i.e. to fall back to the old behaviour. To implement this I would need some (preferably documented and reliable) way of testing this feature’s availability. Do I test for the Firefox version? If so, how? (I couldn’t find anything) (e: oops, found it) Though I would prefer if this wasn’t necessary.

The other way would be if AMO were to offer the new version only to browsers that actually fulfill the strict_min_version requirements and use the old version otherwise (it doesn’t lack any features).

What if you branch between your old code and your new code based on the version number you can derive from:

Whoops, just realized you have a parenthetical about that.

Why isn’t that best? You can continue with one sequence of versions rather than potentially having to maintain an ESR-compatible second sequence as you make other improvements.

2 Likes