summaryrefslogtreecommitdiff
path: root/ext/js/yomitan.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-28 22:17:38 -0500
committerGitHub <noreply@github.com>2023-12-29 03:17:38 +0000
commit1e254fd1d4423b984e176547ef36a14383bbd7f5 (patch)
tree8aae2c47f80265d5f1f39c927e19455ec3986387 /ext/js/yomitan.js
parenta51ae1533c54162f14785652e9128f90afb86aed (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/yomitan.js')
-rw-r--r--ext/js/yomitan.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/js/yomitan.js b/ext/js/yomitan.js
index 621e9cf0..8980c589 100644
--- a/ext/js/yomitan.js
+++ b/ext/js/yomitan.js
@@ -50,7 +50,7 @@ if (checkChromeNotAvailable()) {
/**
* The Yomitan class is a core component through which various APIs are handled and invoked.
- * @augments EventDispatcher<import('extension').ExtensionEventType>
+ * @augments EventDispatcher<import('application').Events>
*/
export class Yomitan extends EventDispatcher {
/**
@@ -208,12 +208,22 @@ export class Yomitan extends EventDispatcher {
if (this._isTriggeringExtensionUnloaded) { return; }
try {
this._isTriggeringExtensionUnloaded = true;
- this.trigger('extensionUnloaded');
+ this.trigger('extensionUnloaded', {});
} finally {
this._isTriggeringExtensionUnloaded = false;
}
}
+ /** */
+ triggerStorageChanged() {
+ this.trigger('storageChanged', {});
+ }
+
+ /** */
+ triggerClosePopups() {
+ this.trigger('closePopups', {});
+ }
+
// Private
/**