aboutsummaryrefslogtreecommitdiff
path: root/ext/js/input/hotkey-handler.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-01 10:00:59 -0500
committerGitHub <noreply@github.com>2024-02-01 15:00:59 +0000
commitdfd42bad0b46845ad88d1fdc5fa82b4f03bab0f3 (patch)
tree04686b943b84b33b8927238be17e4bc0dda7eb62 /ext/js/input/hotkey-handler.js
parent2356223942a21d1683ac38eed8e7b9485f453d87 (diff)
Application refactor (#591)
* Rename Yomitan class to Application, change initialization style * Rename file * Update init * Update config * Remove dead code
Diffstat (limited to 'ext/js/input/hotkey-handler.js')
-rw-r--r--ext/js/input/hotkey-handler.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/input/hotkey-handler.js b/ext/js/input/hotkey-handler.js
index 3b40a86d..9caedcc2 100644
--- a/ext/js/input/hotkey-handler.js
+++ b/ext/js/input/hotkey-handler.js
@@ -19,7 +19,6 @@
import {EventDispatcher} from '../core/event-dispatcher.js';
import {EventListenerCollection} from '../core/event-listener-collection.js';
import {DocumentUtil} from '../dom/document-util.js';
-import {yomitan} from '../yomitan.js';
/**
* Class which handles hotkey events and actions.
@@ -47,11 +46,12 @@ export class HotkeyHandler extends EventDispatcher {
/**
* Begins listening to key press events in order to detect hotkeys.
+ * @param {import('../comm/cross-frame-api.js').CrossFrameAPI} crossFrameApi
*/
- prepare() {
+ prepare(crossFrameApi) {
this._isPrepared = true;
this._updateEventHandlers();
- yomitan.crossFrame.registerHandlers([
+ crossFrameApi.registerHandlers([
['hotkeyHandlerForwardHotkey', this._onMessageForwardHotkey.bind(this)]
]);
}