feat: support for a waitForBoot command to call getBooted

This commit is contained in:
Derrick Hammer 2023-07-25 11:48:10 -04:00
parent 4074f2475d
commit 1d7be971df
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 1 deletions

View File

@ -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,