diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-12-29 19:17:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-30 00:17:46 +0000 |
commit | 7303da3991814a0ce220bf2fff3e51b968913b86 (patch) | |
tree | 809c289d824ec2a08c5ff54579766b7f5c5e09e1 /ext/js/input/hotkey-handler.js | |
parent | 1b0e0c551d1505ed4242c04ebac224e5fff81f04 (diff) |
Cross frame API safety (#491)
* Require error type
* Add TODOs
* Fix init
* Updates
* More type safety
* Fix incorrect API map
* Update type safety
* Updates
* Add API
* Update types
* Update types
* Updates
* Remove unused
* Restore types
* Update frame ancestry handler
* Simplify names
* Fix
* Remove old message handlers
Diffstat (limited to 'ext/js/input/hotkey-handler.js')
-rw-r--r-- | ext/js/input/hotkey-handler.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/js/input/hotkey-handler.js b/ext/js/input/hotkey-handler.js index 48c2de57..5969af05 100644 --- a/ext/js/input/hotkey-handler.js +++ b/ext/js/input/hotkey-handler.js @@ -51,7 +51,7 @@ export class HotkeyHandler extends EventDispatcher { this._isPrepared = true; this._updateEventHandlers(); yomitan.crossFrame.registerHandlers([ - ['HotkeyHandler.forwardHotkey', this._onMessageForwardHotkey.bind(this)] + ['hotkeyHandlerForwardHotkey', this._onMessageForwardHotkey.bind(this)] ]); } @@ -159,10 +159,7 @@ export class HotkeyHandler extends EventDispatcher { // Message handlers - /** - * @param {{key: string, modifiers: import('input').ModifierKey[]}} details - * @returns {boolean} - */ + /** @type {import('cross-frame-api').ApiHandler<'hotkeyHandlerForwardHotkey'>} */ _onMessageForwardHotkey({key, modifiers}) { return this.simulate(key, modifiers); } |