summaryrefslogtreecommitdiff
path: root/ext/js/app/popup-window.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-01-20 23:13:17 -0500
committerGitHub <noreply@github.com>2024-01-21 04:13:17 +0000
commit6ba1ffe74558dd174e3308d48885fb068fa37d55 (patch)
tree5519bbf972096e0e3370171d2b62a26d6164d671 /ext/js/app/popup-window.js
parentebdde1ee612a262256ad0384131e53bc29b1e10f (diff)
WebExtension class (#551)
* Add WebExtension class * Use WebExtension class * Use WebExtension instance for all runtime message sending * Use getUrl * Add a sendMessage variant which ignores the response and error
Diffstat (limited to 'ext/js/app/popup-window.js')
-rw-r--r--ext/js/app/popup-window.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/app/popup-window.js b/ext/js/app/popup-window.js
index 60d99612..7a0b6af4 100644
--- a/ext/js/app/popup-window.js
+++ b/ext/js/app/popup-window.js
@@ -274,7 +274,7 @@ export class PopupWindow extends EventDispatcher {
* @returns {Promise<import('display').DirectApiReturn<TName>|undefined>}
*/
async _invoke(open, action, params) {
- if (yomitan.isExtensionUnloaded) {
+ if (yomitan.webExtension.unloaded) {
return void 0;
}
@@ -290,7 +290,7 @@ export class PopupWindow extends EventDispatcher {
message
));
} catch (e) {
- if (yomitan.isExtensionUnloaded) {
+ if (yomitan.webExtension.unloaded) {
open = false;
}
}