mirror of
https://github.com/denoland/deno.git
synced 2024-10-30 09:08:00 -04:00
5151afa123
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
11 lines
219 B
JavaScript
11 lines
219 B
JavaScript
onmessage = async ({ data }) => {
|
|
const { state } = await Deno.permissions.query({
|
|
name: "read",
|
|
path: data.path,
|
|
});
|
|
|
|
postMessage({
|
|
hasPermission: state === "granted",
|
|
index: data.index,
|
|
});
|
|
};
|