mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 15:49:44 -05: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,
|
|
});
|
|
};
|