Detecting upgrade from legacy XUL extension to WebExtension

Hello,

I’m rewriting my legacy XUL extension as a WebExtension, and want to display a special post-upgrade migration page on first-run of the WebExtension after users upgrade from the older legacy XUL version to the new WebExtension version. I tried using runtime.onInstalled.addListener() in my WebExtension’s background.js, but the onInstalled event listener isn’t being called at all when I did a test upgrade. The event listener code has some console.log() calls, so I’m expecting to see debugging messages in the browser console, but am not.

Is runtime.onInstalled able to handle the upgrade from legacy XUL to WebExtensions? If not, what is another suggested way to accomplish the same thing?

I suspect the runtime.onInstalled.addListener is fired during an actual upgrade/install. Manually loading the WebExtension (test upgrade) may not cause it to fire.

Thanks erosman. Looks like I’ll have to change my strategy for handling upgrades/installs.