aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background/offscreen.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 19:33:01 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 19:33:01 -0500
commit14d12f6ba20b837a04c638b935773f3120e194ff (patch)
treedcd6b61d51ff39c97b60812b2bf3c8cd564347f8 /ext/js/background/offscreen.js
parentd5b1217df3fe7480fc5f58fe194f5bbf73281094 (diff)
Update timer types and such
Diffstat (limited to 'ext/js/background/offscreen.js')
-rw-r--r--ext/js/background/offscreen.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/js/background/offscreen.js b/ext/js/background/offscreen.js
index 45345c01..8da661ad 100644
--- a/ext/js/background/offscreen.js
+++ b/ext/js/background/offscreen.js
@@ -51,7 +51,7 @@ export class Offscreen {
});
/** @type {import('offscreen').MessageHandlerMap} */
- this._messageHandlers = new Map([
+ const messageHandlers = new Map([
['clipboardGetTextOffscreen', {async: true, handler: this._getTextHandler.bind(this)}],
['clipboardGetImageOffscreen', {async: true, handler: this._getImageHandler.bind(this)}],
['clipboardSetBrowserOffscreen', {async: false, handler: this._setClipboardBrowser.bind(this)}],
@@ -65,6 +65,8 @@ export class Offscreen {
['getTermFrequenciesOffscreen', {async: true, handler: this._getTermFrequenciesHandler.bind(this)}],
['clearDatabaseCachesOffscreen', {async: false, handler: this._clearDatabaseCachesHandler.bind(this)}]
]);
+ /** @type {import('offscreen').MessageHandlerMap<string>} */
+ this._messageHandlers = messageHandlers;
const onMessage = this._onMessage.bind(this);
chrome.runtime.onMessage.addListener(onMessage);