Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1131069 of management

  • Revision slug: Mozilla/Add-ons/WebExtensions/API/management
  • Revision title: management
  • Revision id: 1131069
  • Created:
  • Creator: wbamberg
  • Is current revision? No
  • Comment

Revision Content

{{AddonSidebar}}

This API provides ways to manage the list of extensions that are installed and running.

Types

{{WebExtAPIRef("management.ExtensionInfo")}}
Information about an installed extension.

Functions

{{WebExtAPIRef("management.getAll()")}}
Returns a list of information about installed extensions.
{{WebExtAPIRef("management.get()")}}
Returns information about the installed extension that has the given ID.
{{WebExtAPIRef("management.getSelf()")}}
Returns information about the calling extension.
{{WebExtAPIRef("management.uninstall()")}}
Uninstalls the specified extension.
{{WebExtAPIRef("management.uninstallSelf()")}}
Uninstalls the calling extension.
{{WebExtAPIRef("management.getPermissionWarningsById()")}}
Get the set of permission warnings for an add-on, given its ID.
{{WebExtAPIRef("management.getPermissionWarningsByManifest()")}}
Get the set of permission warnings that would be displayed for the given manifest string.
{{WebExtAPIRef("management.setEnabled()")}}
Enable/disable the specified add-on.

Events

{{WebExtAPIRef("management.onInstalled")}}
Fired when an add-on is installed.
{{WebExtAPIRef("management.onUninstalled")}}
Fired when an add-on is uninstalled.
{{WebExtAPIRef("management.onEnabled")}}
Fired when an add-on is enabled.
{{WebExtAPIRef("management.onDisabled")}}
Fired when an add-on is disabled.

Browser compatibility

{{WebExtBrowserCompat}}

{{WebExtChromeCompat}} {{WebExtExamples("h2")}}

Acknowledgements

This API is based on Chromium's chrome.management API. This documentation is derived from management.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Revision Source

<div>{{AddonSidebar}}</div>

<p>This API provides ways to manage the list of extensions that are installed and running.</p>

<h2 id="Types">Types</h2>

<dl>
 <dt>{{WebExtAPIRef("management.ExtensionInfo")}}</dt>
 <dd>Information about an installed extension.</dd>
</dl>

<h2 id="Functions">Functions</h2>

<dl>
 <dt>{{WebExtAPIRef("management.getAll()")}}</dt>
 <dd>Returns a list of information about installed extensions.</dd>
 <dt>{{WebExtAPIRef("management.get()")}}</dt>
 <dd>Returns information about the installed extension that has the given ID.</dd>
 <dt>{{WebExtAPIRef("management.getSelf()")}}</dt>
 <dd>Returns information about the calling extension.</dd>
 <dt>{{WebExtAPIRef("management.uninstall()")}}</dt>
 <dd>Uninstalls the specified extension.</dd>
 <dt>{{WebExtAPIRef("management.uninstallSelf()")}}</dt>
 <dd>Uninstalls the calling extension.</dd>
 <dt>{{WebExtAPIRef("management.getPermissionWarningsById()")}}</dt>
 <dd>Get the set of permission warnings for an add-on, given its ID.</dd>
 <dt>{{WebExtAPIRef("management.getPermissionWarningsByManifest()")}}</dt>
 <dd>Get the set of permission warnings that would be displayed for the given manifest string.</dd>
 <dt>{{WebExtAPIRef("management.setEnabled()")}}</dt>
 <dd>Enable/disable the specified add-on.</dd>
 <dt>
 <h2 id="Events">Events</h2>
 </dt>
 <dt>{{WebExtAPIRef("management.onInstalled")}}</dt>
 <dd>Fired when an add-on is installed.</dd>
 <dt>{{WebExtAPIRef("management.onUninstalled")}}</dt>
 <dd>Fired when an add-on is uninstalled.</dd>
 <dt>{{WebExtAPIRef("management.onEnabled")}}</dt>
 <dd>Fired when an add-on is enabled.</dd>
 <dt>{{WebExtAPIRef("management.onDisabled")}}</dt>
 <dd>Fired when an add-on is disabled.</dd>
</dl>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{WebExtBrowserCompat}}</p>

<div class="hidden note">
<p>The "Chrome incompatibilities" section is included from <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities"> https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities</a> using the <a href="/en-US/docs/Template:WebExtChromeCompat">WebExtChromeCompat</a> macro.</p>

<p>If you need to update this content, edit <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities">https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities</a>, then shift-refresh this page to see your changes.</p>
</div>

<p>{{WebExtChromeCompat}} {{WebExtExamples("h2")}}</p>

<div class="note"><strong>Acknowledgements</strong>

<p>This API is based on Chromium's <a href="https://developer.chrome.com/extensions/management"><code>chrome.management</code></a> API. This documentation is derived from <a href="https://chromium.googlesource.com/chromium/src/+/master/extensions/common/api/management.json"><code>management.json</code></a> in the Chromium code.</p>

<p>Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.</p>
</div>

<div class="hidden">
<pre>
// Copyright 2012 The Chromium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//    * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//    * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//    * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre>
</div>
Revert to this revision