Extension Manager:API Rewrite:API: Difference between revisions

Jump to navigation Jump to search
Line 5: Line 5:
==getInstallForURL==
==getInstallForURL==


Creates a new object representing an add-on installation from a url. This may perform a request to the URL to determine the type of add-on before passing an [[#AddonInstall|AddonInstall]] onto the provided callback.
Creates a new object representing an add-on installation from a url. This may perform a request to the URL to determine the type of add-on before passing an [[#AddonInstall|AddonInstall]] onto the provided callback. Operates asynchronously.


;url :The URL to install the add-on from
;url :The URL to install the add-on from
Line 16: Line 16:
==getInstallForFile==
==getInstallForFile==


Creates a new object reperesenting an add-on installation from a local file, properties for the install will be loaded out of the file before the callback is called.
Creates a new object reperesenting an add-on installation from a local file, properties for the install will be loaded out of the file. Operates asynchronously.


;file :A <code>nsIFile</code> to install the add-on from
;file :A <code>nsIFile</code> to install the add-on from
Line 23: Line 23:
==getInstalls==
==getInstalls==


Returns the list of known add-on installs optionally restricting to a set of types of add-ons.
Returns the list of known add-on installs optionally restricting to a set of types of add-ons. Operates asynchronously.


;types :An array of types of add-ons to return (optional)
;types :An array of types of add-ons to return (optional)
Line 42: Line 42:
==getAddon==
==getAddon==


Gets an installed add-on.
Gets an installed add-on. Operates asynchronously.
 
'''TODO''' Make this asynchronous.


;id :The ID of the add-on to retrieve
;id :The ID of the add-on to retrieve
 
;callback :A function that will be passed an [[#Addon|Addon]] representing the add-on or null if there is no installed add-on with the given ID
;returns :An [[#Addon|Addon]] representing the add-on or null if there is no installed add-on with the given ID


==getAddons==
==getAddons==


Gets an array of the installed add-ons optionally restricting to a set of types.
Gets an array of the installed add-ons optionally restricting to a set of types. Operates asynchronously.
 
'''TODO''' Make this asynchronous.


;types :An array of types of add-ons to return (optional)
;types :An array of types of add-ons to return (optional)
 
;callback :A function that will be passed an array of [[#Addon|Addons]] representing the installed add-ons
;returns :An array of [[#Addon|Addons]] representing the installed add-ons


==addAddonListener==
==addAddonListener==
canmove, Confirmed users
1,570

edits

Navigation menu