-
In webextensions-polyfill i can use browser.alarms.create("alarm1", { periodInMinutes: 0.1 }); and browser.alarms.onAlarm.addListener((alarm) => { }) to trigger periodic events but this seems to not work in WXT am i missing something, as i cant figure out a way to do periodic events from background like opening a tab to execute a script. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
if i try to console.log(browser.alarms) even it's showing as undefined which doesn't make sense because in vscode i'm seeing the typecompletion for it but for some reason it seems the WXT side doesn't work. |
Beta Was this translation helpful? Give feedback.
-
Add the |
Beta Was this translation helpful? Give feedback.
-
HAHAHA your right, for some reason, i was being dumb and forgot that you had to opt-in to allowing alarms! Thanks! |
Beta Was this translation helpful? Give feedback.
Add the
alarms
permission to your manifesthttps://wxt.dev/guide/manifest.html#permissions