A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions below:

permissions - Mozilla | MDN

permissions

Enables extensions to request extra permissions at runtime, after they have been installed.

Extensions need permissions to access more powerful WebExtension APIs. They can ask for permissions at install time, by including the permissions they need in the permissions manifest.json key. The main advantages of asking for permissions at install time are:

In most major browsers, users can see if their installed extensions request advanced permissions through the browser's extensions manager.

With the permissions API, an extension can ask for additional permissions at runtime. These permissions need to be listed in the optional_permissions manifest.json key. Note that some permissions are not allowed in optional_permissions. The main advantages of this are:

To use the permissions API, decide which permissions your extension can request at runtime, and list them in optional_permissions. After this, you can request any permissions that were included in optional_permissions. Requests may only be made in the handler for a user action (for example, a click handler).

Starting with Firefox 84, users will be able to manage optional permissions of installed extensions from the Add-ons Manager. Extensions that use optional permissions should listen for browser.permissions.onAdded and browser.permissions.onRemoved API events to know when a user grants or revokes these permissions.

For advice on designing your request for runtime permissions, to maximize the likelihood that users grant them, see Request permissions at runtime.

Types
permissions.Permissions

Represents a set of permissions.

Methods
permissions.contains()

Discover an extension's given set of permissions.

permissions.getAll()

Get all the permissions this extension currently has.

permissions.remove()

Give up a set of permissions.

permissions.request()

Ask for a set of permissions.

Event handlers
permissions.onAdded

Fired when a new permission is granted.

permissions.onRemoved

Fired when a permission is removed.

Browser compatibility See also Example extensions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4