diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-12-28 22:17:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-29 03:17:38 +0000 |
commit | 1e254fd1d4423b984e176547ef36a14383bbd7f5 (patch) | |
tree | 8aae2c47f80265d5f1f39c927e19455ec3986387 /ext/js/comm | |
parent | a51ae1533c54162f14785652e9128f90afb86aed (diff) |
Event dispatcher refactor (#463)
* Refactor EventDispatcher template type
* Update core types
* Update log
* Update clipboard monitor
* Update application events
* Update popup events
* Update text scanner
* Update cross frame API
* Update display events
* Type updates
* Update display history
* Update query parser
* Update search persistent state controller
* Update panel element
* Update popup menu
* Update audio system
* Update hotkey handler
* Update settings controller
* Update audio controller
* Update types
* Update types
* Update types
* Add event handler types
* Update type
* Fix issues
* Remove error suppression
* Fix typo
Diffstat (limited to 'ext/js/comm')
-rw-r--r-- | ext/js/comm/clipboard-monitor.js | 4 | ||||
-rw-r--r-- | ext/js/comm/cross-frame-api.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/js/comm/clipboard-monitor.js b/ext/js/comm/clipboard-monitor.js index 3b3a56a9..d717dff2 100644 --- a/ext/js/comm/clipboard-monitor.js +++ b/ext/js/comm/clipboard-monitor.js @@ -19,7 +19,7 @@ import {EventDispatcher} from '../core.js'; /** - * @augments EventDispatcher<import('clipboard-monitor').EventType> + * @augments EventDispatcher<import('clipboard-monitor').Events> */ export class ClipboardMonitor extends EventDispatcher { /** @@ -71,7 +71,7 @@ export class ClipboardMonitor extends EventDispatcher { ) { this._previousText = text; if (canChange && this._japaneseUtil.isStringPartiallyJapanese(text)) { - this.trigger('change', /** @type {import('clipboard-monitor').ChangeEvent} */ ({text})); + this.trigger('change', {text}); } } diff --git a/ext/js/comm/cross-frame-api.js b/ext/js/comm/cross-frame-api.js index 023ca18e..14e410a8 100644 --- a/ext/js/comm/cross-frame-api.js +++ b/ext/js/comm/cross-frame-api.js @@ -22,9 +22,9 @@ import {parseJson} from '../core/json.js'; import {yomitan} from '../yomitan.js'; /** - * @augments EventDispatcher<import('cross-frame-api').CrossFrameAPIPortEventType> + * @augments EventDispatcher<import('cross-frame-api').CrossFrameAPIPortEvents> */ -class CrossFrameAPIPort extends EventDispatcher { +export class CrossFrameAPIPort extends EventDispatcher { /** * @param {number} otherTabId * @param {number} otherFrameId |