summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-15 13:26:59 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-22 20:35:26 -0500
commitdec7f6cabbe28b044698258a748685b1f0d35398 (patch)
treee6299d4421aa59e3c3233da9db5362ce5f699724 /ext
parent8b89e99eff53cf9bc8907cff80d389f07ff726fb (diff)
Add comment describing what token is used for
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/search.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 3d6024f0..de2bca64 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -244,6 +244,9 @@ class DisplaySearch extends Display {
}
startClipboardMonitor() {
+ // The token below is used as a unique identifier to ensure that a new clipboard monitor
+ // hasn't been started during the await call. The check below the await this.getClipboardText()
+ // call will exit early if the reference has changed.
const token = {};
const intervalCallback = async () => {
this.clipboardMonitorTimerId = null;