summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-03-02 00:39:15 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2020-03-02 00:39:15 +0200
commite6e5f23cf8481db31b94c18244f404dd3374ad90 (patch)
tree40a91f96a9d6145cd73761e3aafda2b7498fb64e /ext/bg/js
parent2abf46b6fa9d6c03be0d98045e111f2d8e1e41d5 (diff)
fix API calls when Backend isn't ready yet
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 07dca370..e849bc69 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -48,6 +48,7 @@ class Backend {
this.messageToken = yomichan.generateId(16);
this._messageHandlers = new Map([
+ ['isBackendReady', this._onApiIsBackendReady.bind(this)],
['optionsSchemaGet', this._onApiOptionsSchemaGet.bind(this)],
['optionsGet', this._onApiOptionsGet.bind(this)],
['optionsGetFull', this._onApiOptionsGetFull.bind(this)],
@@ -267,6 +268,10 @@ class Backend {
// Message handlers
+ async _onApiIsBackendReady() {
+ return true;
+ }
+
async _onApiOptionsSchemaGet() {
return this.getOptionsSchema();
}