Explain purpose of timer thread.
This commit is contained in:
parent
464bbc3762
commit
6d677f0ec5
@ -1,3 +1,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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user