Suppose I have the following code at the top level of a nonpersistent background script:
browser.tabs.query({}).then((tabs) => console.log(tabs));
Does this piece of code run every time the background script resumes?
If so, how can I make something run only once in the extension’s lifetime?