2021-01-06 15:31:16 -05:00
|
|
|
self.onmessage = async () => {
|
|
|
|
const hrtime = await Deno.permissions.query({ name: "hrtime" });
|
|
|
|
const net = await Deno.permissions.query({ name: "net" });
|
2021-08-06 17:28:10 -04:00
|
|
|
const ffi = await Deno.permissions.query({ name: "ffi" });
|
2021-01-06 15:31:16 -05:00
|
|
|
const read = await Deno.permissions.query({ name: "read" });
|
|
|
|
const run = await Deno.permissions.query({ name: "run" });
|
|
|
|
const write = await Deno.permissions.query({ name: "write" });
|
|
|
|
self.postMessage(
|
2021-10-13 13:04:44 -04:00
|
|
|
hrtime.state === "prompt" &&
|
|
|
|
net.state === "prompt" &&
|
|
|
|
ffi.state === "prompt" &&
|
|
|
|
read.state === "prompt" &&
|
|
|
|
run.state === "prompt" &&
|
|
|
|
write.state === "prompt",
|
2021-01-06 15:31:16 -05:00
|
|
|
);
|
|
|
|
self.close();
|
|
|
|
};
|