commit 6d677f0ec531fc8caea487e916884b14a049891a parent 464bbc3762906b3a61ddd85f4c207f140b2b750a Author: Florian Dold <florian.dold@gmail.com> Date: Thu, 17 Dec 2015 13:37:57 +0100 Explain purpose of timer thread. Diffstat:
| M | extension/background/timerThread.js | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/extension/background/timerThread.js b/extension/background/timerThread.js @@ -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); }