• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. B2G OS APIs
  5. PermissionSettings
  6. PermissionSettings.get()

PermissionSettings.get()

In This Article
  1. Summary
  2. Syntax
    1. Parameters
    2. Return
  3. Specifications
  4. See also

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

Summary

The get method allows to retrieve the current status of a given permission for a given app.

Syntax

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

Parameters

permission
A string with the name of the permission to retrieve.
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.

Return

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

Specifications

Not part of any specification.

See also

  • PermissionSettings
  • The Permissions API
  • App permissions

Document Tags and Contributors

Tags: 
  • API
  • B2G
  • Firefox OS
  • Method
  • Non Standard
  • Permissions
  • Reference
  • Référence
 Contributors to this page: chrisdavidmills, teoli, kscarfone, Jeremie
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:08:51 AM
See also
  1. Permissions API
  2. Archive
  3. Related pages for Permissions API
    1. Navigator.permissions
    2. PermissionStatus
    3. Permissions