| Argument | Description | Types / Required |
| permissions | Privileged resources allowed without requiring the user's consent. | string, array
not required |
The permissions argument grants a web view access to a device resource without requiring user confirmation. It can be specified as a string specifying a single permission, or an array specifying multiple permissions. Once use of a resource is permitted, it cannot be revoked for that web view, and any subsequent setting of permissions will add to, not replace, the list of permitted resources. Permissions include:
- "camera": Permission to capture photos or video using a camera.
- "geolocation": Permission to access a device's geolocation using a GPS receiver or other location provider.
- "microphone": Permission to capture audio using a microphone.
- "web_storage": Permission to use the Web Storage API (localStorage and sessionStorage). This permission is only required on Android.
The action returns undefined.
The action throws an exception if any of its arguments are not specified in a valid form.
<script>
const CS = new CSProActionInvoker();
CS.UI.setWebViewOptions({
permissions: "geolocation"
});
navigator.geolocation.getCurrentPosition(onLocationSuccess, onLocationError);
</script>