aboutsummaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2015-12-17 13:37:57 +0100
committerFlorian Dold <florian.dold@gmail.com>2015-12-17 13:37:57 +0100
commit6d677f0ec531fc8caea487e916884b14a049891a (patch)
tree8574b4de63809f1740cfe24fbf3521ea255000ad /extension
parent464bbc3762906b3a61ddd85f4c207f140b2b750a (diff)
downloadwallet-core-6d677f0ec531fc8caea487e916884b14a049891a.tar.xz
Explain purpose of timer thread.
Diffstat (limited to 'extension')
-rw-r--r--extension/background/timerThread.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/extension/background/timerThread.js b/extension/background/timerThread.js
index a42b0edf6..7ac66a711 100644
--- 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);
}