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/yomitan.js | |
parent | e0e29dc1aa0965b3e0fb97de64a27c2b695e068b (diff) |
Simplify message handlers (#396)
Diffstat (limited to 'ext/js/yomitan.js')
-rw-r--r-- | ext/js/yomitan.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/js/yomitan.js b/ext/js/yomitan.js index 37455d00..1d6f7644 100644 --- a/ext/js/yomitan.js +++ b/ext/js/yomitan.js @@ -90,13 +90,13 @@ export class Yomitan extends EventDispatcher { /* eslint-disable no-multi-spaces */ /** @type {import('core').MessageHandlerMap} */ - this._messageHandlers = new Map(/** @type {import('core').MessageHandlerArray} */ ([ - ['Yomitan.isReady', {async: false, handler: this._onMessageIsReady.bind(this)}], - ['Yomitan.backendReady', {async: false, handler: this._onMessageBackendReady.bind(this)}], - ['Yomitan.getUrl', {async: false, handler: this._onMessageGetUrl.bind(this)}], - ['Yomitan.optionsUpdated', {async: false, handler: this._onMessageOptionsUpdated.bind(this)}], - ['Yomitan.databaseUpdated', {async: false, handler: this._onMessageDatabaseUpdated.bind(this)}], - ['Yomitan.zoomChanged', {async: false, handler: this._onMessageZoomChanged.bind(this)}] + this._messageHandlers = new Map(/** @type {import('core').MessageHandlerMapInit} */ ([ + ['Yomitan.isReady', this._onMessageIsReady.bind(this)], + ['Yomitan.backendReady', this._onMessageBackendReady.bind(this)], + ['Yomitan.getUrl', this._onMessageGetUrl.bind(this)], + ['Yomitan.optionsUpdated', this._onMessageOptionsUpdated.bind(this)], + ['Yomitan.databaseUpdated', this._onMessageDatabaseUpdated.bind(this)], + ['Yomitan.zoomChanged', this._onMessageZoomChanged.bind(this)] ])); /* eslint-enable no-multi-spaces */ } |