When does the "runtime.onStartup" (not) fire?

347 views
Skip to first unread message

Juraj M.

unread,
Feb 27, 2023, 1:35:02 PM2/27/23
to Chromium Extensions
The DOCS are not really clear about this event:
  • Fired when a profile that has this extension installed first starts up.
Why does it mention "profile"? Why not simply "on browser start", or "on extension start"?

So, will it fire when:
1. browser updates?
2. extension updates?
3. opening browser after it was "closed" BUT kept running in background? I don't really know how this works, but some Chromium browsers like Edge or Opera can keep "something" running in the background even when the browser is closed... Maybe also Chrome in ChromeOS?

And are there some common use-cases for this API?

Jackie Han

unread,
Feb 27, 2023, 2:07:36 PM2/27/23
to Juraj M., Chromium Extensions
This is an edge area. Chrome supports multiple profiles. Each profile is independent, including installed extensions.
When Chrome starts, it only opens one profile, you can then open/close other profiles. Everytime when a profile is opened, extensions in that profile will fire an event in runtime.onStartup(). In other cases, no startup event fired.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/c7861621-beb3-4b1e-aaad-20e7d96232den%40chromium.org.
Reply all
Reply to author
Forward
0 new messages