The browser.management API provides ways to manage the list of extensions that are installed and running.

Not allowed in: Content scripts, Devtools pages

_InstallOptions
_InstallReturnResult
_UninstallSelfOptions
ExtensionInfo
IconInfo
ExtensionDisabledReason
ExtensionInstallType
ExtensionType
onDisabled
onEnabled
onInstalled
onUninstalled
get
getAll
getSelf
install
setEnabled
uninstallSelf
ExtensionDisabledReason: "unknown" | "permissions_increase"

A reason the item is disabled.

ExtensionInstallType: "development" | "normal" | "sideload" | "other"

How the extension was installed. One of development: The extension was loaded unpacked in developer mode, normal: The extension was installed normally via an .xpi file, sideload: The extension was installed by other software on the machine, other: The extension was installed by other means.

ExtensionType: "extension" | "theme"

The type of this extension, 'extension' or 'theme'.

onDisabled: WebExtEvent<(info: ExtensionInfo) => void>

Fired when an addon has been disabled.

onEnabled: WebExtEvent<(info: ExtensionInfo) => void>

Fired when an addon has been enabled.

onInstalled: WebExtEvent<(info: ExtensionInfo) => void>

Fired when an addon has been installed.

onUninstalled: WebExtEvent<(info: ExtensionInfo) => void>

Fired when an addon has been uninstalled.

  • Returns information about the installed extension that has the given ID.

    Parameters

    • id: string

      The ID from an item of management.ExtensionInfo.

    Returns Promise<ExtensionInfo>

  • Returns a list of information about installed extensions.

    Returns Promise<ExtensionInfo[]>

  • Returns information about the calling extension. Note: This function can be used without requesting the 'management' permission in the manifest.

    Returns Promise<ExtensionInfo>

  • Enables or disables the given add-on.

    Parameters

    • id: string

      ID of the add-on to enable/disable.

    • enabled: boolean

      Whether to enable or disable the add-on.

    Returns Promise<void>

  • Uninstalls the calling extension. Note: This function can be used without requesting the 'management' permission in the manifest.

    Parameters

    Returns Promise<void>