canmove, Confirmed users
1,570
edits
(→Addon) |
|||
| Line 108: | Line 108: | ||
An Addon represents an instance of an installed add-on. Some of these listed properties may be relevant for only XPI style add-ons. | An Addon represents an instance of an installed add-on. Some of these listed properties may be relevant for only XPI style add-ons. | ||
==id (string, readonly)== | ==Required Properties== | ||
===id (string, readonly)=== | |||
The ID of the add-on. No other installed add-on will have the same ID. | The ID of the add-on. No other installed add-on will have the same ID. | ||
==version (string, readonly)== | ===version (string, readonly)=== | ||
The version of the add-on. | The version of the add-on. | ||
==type (string, readonly)== | ===type (string, readonly)=== | ||
The type of the add-on. | The type of the add-on. | ||
== | ===isCompatible (boolean, readonly)=== | ||
True or false depending on whether the add-on is compatible with the current version and platform of the application. | |||
== | ===providesUpdatesSecurely (boolean, readonly)=== | ||
True if the add-on has a secure means of updating. | |||
== | ===blocklistState (number, readonly)=== | ||
The | The current blocklist state of this add-on. | ||
== | ===appDisabled (boolean, readonly)=== | ||
True if this add-on cannot be used in the application based on version compatibility, dependencies and blocklisting. | |||
== | ===userDisabled (boolean)=== | ||
True | True if the user wants this add-on to be disabled. Listeners may be notified of the change asynchronously. | ||
== | ===scope (number, readonly)=== | ||
Indicates what scope the add-on is installed in, per profile, user, system or application. | |||
===updateAutomatically (boolean)=== | |||
Whether updates found for this add-on will be applied automatically. | |||
===isActive (boolean, readonly)=== | |||
True if the add-on is currently functional. For some add-ons this will change immediately based on the appDisabled and userDisabled properties, for others it will only change after an application restart. | |||
== | ===name (string, readonly)=== | ||
The | The name of the add-on. | ||
== | ===description (string, readonly)=== | ||
The description of the add-on. | |||
== | ===creator (string, readonly)=== | ||
The creator of the add-on. | |||
== | ===homepageURL (string, readonly)=== | ||
The homepageURL of the add-on. | |||
===pendingOperations (number, readonly)=== | |||
A bitfield holding all of the current operations that are waiting to be performed for this add-on. Operations are generally deferred when a restart is necessary to accomplish them. | |||
===permissions (number, readonly)=== | |||
A bitfield holding all the the operations that can be performed on this add-on. Operations my be restricted based on system policies (e.g. the system administrator may not allow certain add-ons to be uninstalled), add-on type (e.g. themes may not be disabled) or add-on state (e.g. an incompatible add-on cannot be enabled). | |||
==Optional Properties== | |||
== | ===installDate (Date, readonly, optional)=== | ||
The Date that the add-on was first installed. | The Date that the add-on was first installed. | ||
== | ===updateDate (Date, readonly, optional)=== | ||
The Date that the add-on was most recently updated. | The Date that the add-on was most recently updated. | ||
== | ===optionsURL (string, readonly, optional)=== | ||
The | The url of the options dialog to display for this add-on. | ||
== | ===aboutURL (string, readonly, optional)=== | ||
The | The url of the about dialog to display for this add-on. | ||
== | ===iconURL (string, readonly, optional)=== | ||
The | The url of the icon that represents this add-on. | ||
== | ===screenshots (array of string, readonly, optional)=== | ||
The | The urls of preview images for the add-ons. | ||
==developers (string array, readonly)== | ===developers (string array, readonly, optional)=== | ||
The developers of the add-on. | The developers of the add-on. | ||
==translators (string array, readonly)== | ===translators (string array, readonly, optional)=== | ||
The translators of the add-on. | The translators of the add-on. | ||
==contributors (string array, readonly)== | ===contributors (string array, readonly, optional)=== | ||
The contributors of the add-on. | The contributors of the add-on. | ||
==pendingUpgrade (Addon, readonly)== | ===pendingUpgrade (Addon, readonly, optional)=== | ||
If a this add-on will be replaced on the next restart this property will hold the new Addon object. | If a this add-on will be replaced on the next restart this property will hold the new Addon object. | ||
== | ===install ([[#AddonInstall|AddonInstall]], readonly, optional)=== | ||
The [[#AddonInstall|AddonInstall]] that will install this addon. Only available if this addon is in the process of being installed. | |||
== | ==Required Methods== | ||
==isCompatibleWith== | ===isCompatibleWith=== | ||
Tests whether this add-on is known to be compatible with a particular application and platform version. | Tests whether this add-on is known to be compatible with a particular application and platform version. | ||
| Line 235: | Line 233: | ||
;platformVersion :A platform version to test against | ;platformVersion :A platform version to test against | ||
==uninstall== | ===uninstall=== | ||
Uninstalls this add-on. If possible the uninstall will happen immediately otherwise it will wait until the next application restart. Listeners may be notified of the uninstall asynchronously. | Uninstalls this add-on. If possible the uninstall will happen immediately otherwise it will wait until the next application restart. Listeners may be notified of the uninstall asynchronously. | ||
==cancelUninstall== | ===cancelUninstall=== | ||
Cancels uninstalling an add-on if it is pending uninstall. | Cancels uninstalling an add-on if it is pending uninstall. | ||
==findUpdates== | ===findUpdates=== | ||
Starts an update check for this add-on. This will perform asynchronously and deliver results to the given listener. | Starts an update check for this add-on. This will perform asynchronously and deliver results to the given listener. | ||
| Line 257: | Line 255: | ||
;platformVersion :A platform version to check for updates for (optional) | ;platformVersion :A platform version to check for updates for (optional) | ||
==hasResource== | ===hasResource=== | ||
Checks whether a file resource is available for this add-on. For XPI style add-ons for example it tests whether the named file was included in the package. | Checks whether a file resource is available for this add-on. For XPI style add-ons for example it tests whether the named file was included in the package. | ||
| Line 263: | Line 261: | ||
;path :A "/" separated path for the resource. | ;path :A "/" separated path for the resource. | ||
==getResourceURL== | ===getResourceURL=== | ||
Gets a url to the file resource. | Gets a url to the file resource. | ||