aboutsummaryrefslogtreecommitdiff
path: root/extension/background/timerThread.js
blob: 7ade360f31aa191c0c008ade35132f68e11f75a4 (plain)
1
2
3
4
5
6
7
8
9
10
/**
 * This file should be used as a WebWorker.
 * Background pages in the WebExtensions model do
 * not allow to schedule callbacks that should be called
 * after a timeout.  We can emulate this with WebWorkers.
 */

onmessage = function(e) {
  self.setInterval(() => postMessage(true), e.data.interval);
};