diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-12-20 00:18:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 05:18:55 +0000 |
commit | 3c226215419ca815712e9568f7d871a96f5ff1cf (patch) | |
tree | 8bfe561a0d36589860b64c1758c2e29e92e7e3f4 /ext/js/app/frontend.js | |
parent | e0e29dc1aa0965b3e0fb97de64a27c2b695e068b (diff) |
Simplify message handlers (#396)
Diffstat (limited to 'ext/js/app/frontend.js')
-rw-r--r-- | ext/js/app/frontend.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/js/app/frontend.js b/ext/js/app/frontend.js index a1bbb217..8c11775a 100644 --- a/ext/js/app/frontend.js +++ b/ext/js/app/frontend.js @@ -108,10 +108,10 @@ export class Frontend { /* eslint-disable no-multi-spaces */ /** @type {import('core').MessageHandlerMap} */ - this._runtimeMessageHandlers = new Map(/** @type {import('core').MessageHandlerArray} */ ([ - ['Frontend.requestReadyBroadcast', {async: false, handler: this._onMessageRequestFrontendReadyBroadcast.bind(this)}], - ['Frontend.setAllVisibleOverride', {async: true, handler: this._onApiSetAllVisibleOverride.bind(this)}], - ['Frontend.clearAllVisibleOverride', {async: true, handler: this._onApiClearAllVisibleOverride.bind(this)}] + this._runtimeMessageHandlers = new Map(/** @type {import('core').MessageHandlerMapInit} */ ([ + ['Frontend.requestReadyBroadcast', this._onMessageRequestFrontendReadyBroadcast.bind(this)], + ['Frontend.setAllVisibleOverride', this._onApiSetAllVisibleOverride.bind(this)], + ['Frontend.clearAllVisibleOverride', this._onApiClearAllVisibleOverride.bind(this)] ])); this._hotkeyHandler.registerActions([ @@ -178,11 +178,11 @@ export class Frontend { /* eslint-disable no-multi-spaces */ yomitan.crossFrame.registerHandlers([ - ['Frontend.closePopup', {async: false, handler: this._onApiClosePopup.bind(this)}], - ['Frontend.copySelection', {async: false, handler: this._onApiCopySelection.bind(this)}], - ['Frontend.getSelectionText', {async: false, handler: this._onApiGetSelectionText.bind(this)}], - ['Frontend.getPopupInfo', {async: false, handler: this._onApiGetPopupInfo.bind(this)}], - ['Frontend.getPageInfo', {async: false, handler: this._onApiGetPageInfo.bind(this)}] + ['Frontend.closePopup', this._onApiClosePopup.bind(this)], + ['Frontend.copySelection', this._onApiCopySelection.bind(this)], + ['Frontend.getSelectionText', this._onApiGetSelectionText.bind(this)], + ['Frontend.getPopupInfo', this._onApiGetPopupInfo.bind(this)], + ['Frontend.getPageInfo', this._onApiGetPageInfo.bind(this)] ]); /* eslint-enable no-multi-spaces */ |