runtime.onInstalled - does this fire with every browser start?

I’m confused about the runtime.onInstalled API: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onInstalled

It says:

Fired when the extension is first installed, when the extension is updated to a new version, and when the browser is updated to a new version.

But in Chrome docs they use it to create context menus: https://developer.chrome.com/docs/extensions/mv3/service_workers/#listeners

So it will fire with every browser start?
If so, then what value will be in the OnInstalledReason?

I believe the way contextMenu.create works at least in chrome is that items are persisted across restarts for an extension.

1 Like

That’s insane :smiley:. I think I’m even more confused now…
Thanks Martin!