mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -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,
|
|
});
|
|
};
|