feat: support for a waitForBoot command to call getBooted
This commit is contained in:
parent
4074f2475d
commit
1d7be971df
|
@ -1,4 +1,4 @@
|
|||
import { getTimer } from "../vars.js";
|
||||
import { getBooted, getTimer } from "../vars.js";
|
||||
import browser from "webextension-polyfill";
|
||||
import { logLargeObjects } from "./background/util.js";
|
||||
import { queryKernel } from "./background/kernel.js";
|
||||
|
@ -25,6 +25,11 @@ browser.runtime.onMessage.addListener(async (request, sender) => {
|
|||
return Promise.reject("data required");
|
||||
}
|
||||
|
||||
if (request.method === "waitForBoot") {
|
||||
await getBooted();
|
||||
return true;
|
||||
}
|
||||
|
||||
const ret = await queryKernel({
|
||||
method: request.method,
|
||||
data: request.data,
|
||||
|
|
Reference in New Issue