Beware that Chromium team ominously reserves the right to
disallow keeping the background script alive per
https://developer.chrome.com/docs/extensions/develop/migrate/to-service-workers#keep-sw-alive
>>>> 3 is not luck, the timers in the extension's pages aren't throttled by design,
Thanks for the clarification.
>>>> but why specifically do you need the background script constantly running instead of saving the state in storage or in the content script?
We only need it running as long as one of our extension pages (not a content script) is loaded displaying data from the websocket connection. The websocket might be shared by multiple tabs / pages so it lives in the service worker.
--
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/d4d830b8-2ac7-4e15-908e-131b50861028n%40chromium.org.
You keep it as long as the tab is open, right? So if the tab is
always open it means the background script keeps running forever.
The intentionally vague way this warning is phrased makes me err
on the side of caution.