Add apiOptionsSchemaGet
This commit is contained in:
parent
50e0fbbb66
commit
d2da4f7e62
@ -115,6 +115,13 @@ class Backend {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getOptionsSchema() {
|
||||||
|
if (this.isPreparedPromise !== null) {
|
||||||
|
await this.isPreparedPromise;
|
||||||
|
}
|
||||||
|
return this.optionsSchema;
|
||||||
|
}
|
||||||
|
|
||||||
async getFullOptions() {
|
async getFullOptions() {
|
||||||
if (this.isPreparedPromise !== null) {
|
if (this.isPreparedPromise !== null) {
|
||||||
await this.isPreparedPromise;
|
await this.isPreparedPromise;
|
||||||
@ -200,6 +207,10 @@ class Backend {
|
|||||||
|
|
||||||
// Message handlers
|
// Message handlers
|
||||||
|
|
||||||
|
_onApiOptionsSchemaGet() {
|
||||||
|
return this.getOptionsSchema();
|
||||||
|
}
|
||||||
|
|
||||||
_onApiOptionsGet({optionsContext}) {
|
_onApiOptionsGet({optionsContext}) {
|
||||||
return this.getOptions(optionsContext);
|
return this.getOptions(optionsContext);
|
||||||
}
|
}
|
||||||
@ -692,6 +703,7 @@ class Backend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Backend._messageHandlers = new Map([
|
Backend._messageHandlers = new Map([
|
||||||
|
['optionsSchemaGet', (self, ...args) => self._onApiOptionsSchemaGet(...args)],
|
||||||
['optionsGet', (self, ...args) => self._onApiOptionsGet(...args)],
|
['optionsGet', (self, ...args) => self._onApiOptionsGet(...args)],
|
||||||
['optionsGetFull', (self, ...args) => self._onApiOptionsGetFull(...args)],
|
['optionsGetFull', (self, ...args) => self._onApiOptionsGetFull(...args)],
|
||||||
['optionsSet', (self, ...args) => self._onApiOptionsSet(...args)],
|
['optionsSet', (self, ...args) => self._onApiOptionsSet(...args)],
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
function apiOptionsSchemaGet() {
|
||||||
|
return _apiInvoke('optionsSchemaGet');
|
||||||
|
}
|
||||||
|
|
||||||
function apiOptionsGet(optionsContext) {
|
function apiOptionsGet(optionsContext) {
|
||||||
return _apiInvoke('optionsGet', {optionsContext});
|
return _apiInvoke('optionsGet', {optionsContext});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user