Open Hajime-san opened 7 months ago
@Hajime-san can you rephrase your question? There is a Deno.permissions.query
API, but I'm not sure that's what you're looking for: https://docs.deno.com/runtime/manual/runtime/permission_apis/
Thank you for replying!
You suggest the Deno.permissions.query
API is a way of to get value that allowed by user.
However, it requires that library or application author to write codes with predicting what permission value will be allowed in detail.
For instance, the Deno.Env.toObject API returns all environment value with giving --allow-env
permission.
So, I'm trying to say that like Deno.env.onAllowed
API extends Event interface (or WICG Proposal Observable) it will return permission allowed environment value at that point.
I'm using the nice library dax heavily to write shell-like script. BTW, it requires all environment variable inside while it needs only
$PATH
environment variable to runls
.as follows
So, I wish if an API to get allowed value of permission.
I'm not clear whether it passes security requirements model of Deno.
Thanks!