Replies: 2 comments 3 replies
-
Not that I know of, sorry lol. Extension development can be tedious like this... |
Beta Was this translation helpful? Give feedback.
0 replies
-
@aklinker1 ok sooo it turns out i was already handling every use-case except one. The worker shutting down. When the worker becomes inactive, the variable i was storing my count in is disposed of. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building an extension that listen for HTTP requests in the background/worker and then displays the number of requests in the badge.
Sounds easy enough, but we have to keep a counter per tab. Also if the website in the tab changes, the counter needs to be reset to zero.
I store the count in a global variable and then use
setBadgeText
, but i have to detecttabs.onUpdated
and figure out if a URL change is real or an SPA etc.. and every day i discover an edge case.I feel like this should be something commun, am I missing something obvious ?
Beta Was this translation helpful? Give feedback.
All reactions