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.
get method allows to retrieve the current status of a given permission for a given app.
var value = navigator.mozPermissionsettings.get(permission, manifest, origin, browserFlag)
- A string with the name of the permission to retrieve.
- 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.
- A string representing the domain name of the app.
- A boolean indicating if the app is running in the browser instead of as an installed app.
A string containing the value of the permission. It can be:
deny: the permission is not allowed
prompt: the user must be prompted next time the permission is needed
allow: the permission is allowed
unknown: the application did not ask for this permission (therefore it is not allowed) and can't even prompt the user to get it
Not part of any specification.