Hi folks
I’m working on converting an Add on to Manifest v3. I have my updated version loaded in about:debugging, and it seems fine right now. But I’m confused about the “Running” status that is shown in this screen:
My Add on seems to be permanently “running” but I’m not sure if this will always be the case. It did stop once and enter “Stopped” state, but I’m not sure how. It’s not happened again. And if I “terminate” it, triggering one of the event listeners in my background script doesn’t seem to start it up again.
So I have the following questions:
- What does the background script’s “Running”/“Stopped” state represent, exactly, for a MV3 Add on?
- What can cause an Add on’s background script to be “Stopped”?
- What can cause an Add on’s background script to be “Started”?
- I know that in the background script, state is not saved. But if I declare variables at the top of my background script (effectively constants), are these brought back into scope when the background script wakes up?
Thanks