aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/api.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-07-03 12:20:22 -0400
committerGitHub <noreply@github.com>2020-07-03 12:20:22 -0400
commita07a8dfff667e0bba20d7199c4d7aa610e98bcdb (patch)
tree0621aa42db97b7ac39207452b54c10b528080f24 /ext/mixed/js/api.js
parentce634325ce3a6ba4994916116b15b90e92666255 (diff)
Extension unload detection (#647)
* Update how extension unload is detected * Remove event handlers and use yomichan.isExtensionUnloaded instead * Update terminology
Diffstat (limited to 'ext/mixed/js/api.js')
-rw-r--r--ext/mixed/js/api.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js
index 1e421147..534154ef 100644
--- a/ext/mixed/js/api.js
+++ b/ext/mixed/js/api.js
@@ -322,7 +322,7 @@ const api = (() => {
const data = {action, params};
return new Promise((resolve, reject) => {
try {
- chrome.runtime.sendMessage(data, (response) => {
+ yomichan.sendMessage(data, (response) => {
this._checkLastError(chrome.runtime.lastError);
if (response !== null && typeof response === 'object') {
if (typeof response.error !== 'undefined') {
@@ -337,7 +337,6 @@ const api = (() => {
});
} catch (e) {
reject(e);
- yomichan.triggerOrphaned(e);
}
});
}