That was my reaction too!
But no, these things “persists” like a storage, across browser / PC restarts!
So in your on-install event you should set your periodic alarm and it will stay registered forever. And it’s same with context menus and some other API.
The onStartup
may be problematic since it’s not really related to extension. I think if you disable and enable your extension, it won’t fire. Also if the browser keeps some instance running (maybe like an Edge), it may not fire if you close and reopen browser (I’m not sure where I read this).
So as you can see, things are pretty complicated and currently there is no “on-extension-start” event. But there are some workarounds with storage.session
.
See also:
Best-practices for “event pages”
http://web.archive.org/web/20140302025634/https://developer.chrome.com/extensions/event_pages#best-practices
MV3 service workers: Running a function once at the start
https://groups.google.com/a/chromium.org/g/chromium-extensions/c/QjuCv-LRK2c/m/qYx70RYhAwAJ