PermissionSettings.set

This article is in need of a technical review.

« PermissionSettings

Non-standard
This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

This API is available on Firefox OS for certified applications only.

Summary

The set method allows to change a given permission for a given app.

Depending on the privileges of the applications, some permissions are implicit. If for some reason the application tries to change permission for an implicit one, an error will be thrown. In order to avoid such errors, it's possible to check if the permission is explicit with the PermissionSettings.isExplicit() method.

Syntax

 var value = navigator.mozPermissionsettings.set(permission, value, manifest, origin, browserFlag)

Parameters

permission
A string with the name of the permission to retrieve.
value
A string representing the new value for the permission, one of deny, prompt, or allow.
manifest
A string representing the URL of the manifest of the app to check, or for an app running inside the browser, the URL of the browser app manifest.
origin
A string representing the domain name of the app.
browserFlag
A boolean indicating if the app is running in the browser instead of as an installed app.

Specifications

Not part of any specification.

See also

Document Tags and Contributors

Contributors to this page: kscarfone, Jeremie
Last updated by: kscarfone,