2 years ago

#42932

test-img

Luke Vo

How do you implement a frequent Timer for Chrome Extension with Manifest version 3?

I have an existing Auto-reload Chrome extension using manifest version 2. It is achieved by using a background page with persistent: true so a setInterval can run indefinitely. Chrome is phasing out MV2 soon so I want to upgrade it realized it's difficult with service worker replacement.

  • The Service Worker would become inactive after about 30 seconds so setTimeout or setInterval is out of question.

  • chrome.alarms only run once every minute and with inaccuracies. My extension provides options under a minute like 10s or 30s.

What is a solution for a general frequent timer like my case?

google-chrome-extension

timer

alarm

microsoft-edge-extension

chrome-extension-manifest-v3

0 Answers

Your Answer

Accepted video resources