Extension Manager:API Rewrite:API: Difference between revisions

Line 288: Line 288:


AddonListeners are notified about changes to the state of add-ons. Certain state changes may not take effect until the next application restart.
AddonListeners are notified about changes to the state of add-ons. Certain state changes may not take effect until the next application restart.
==onEnabling==
Called when an add-on is about to be enabled.
;addon :The [[#Addon|Addon]] that has been enabled
;needsRestart :True if an application restart is necessary for the change to take effect


==onEnabled==
==onEnabled==


Called when an add-on is enabled.
Called when an add-on has been enabled.


;addon :The [[#Addon|Addon]] that has been enabled
;addon :The [[#Addon|Addon]] that has been enabled
==onDisabling==
Called when an add-on is about to be disabled.
;addon :The [[#Addon|Addon]] that has been disabled
;needsRestart :True if an application restart is necessary for the change to take effect
;needsRestart :True if an application restart is necessary for the change to take effect


==onDisabled==
==onDisabled==


Called when an add-on is disabled.
Called when an add-on has been disabled.


;addon :The [[#Addon|Addon]] that has been disabled
;addon :The [[#Addon|Addon]] that has been disabled
==onInstalling==
Called when a new add-on is about to be installed.
;addon :The [[#Addon|Addon]] that has been installed
;needsRestart :True if an application restart is necessary for the change to take effect
;needsRestart :True if an application restart is necessary for the change to take effect


Line 307: Line 326:
Called when a new add-on has been installed.
Called when a new add-on has been installed.


;addon :The [[#Addon|Addon]] that has been installed
;addon :The [[#Addon|Addon]] that has been installed.
 
==onUninstalling==
 
Called when an add-on is about to be uninstalled.
 
;addon :The [[#Addon|Addon]] that has been uninstalled
;needsRestart :True if an application restart is necessary for the change to take effect
;needsRestart :True if an application restart is necessary for the change to take effect
;oldAddon :If this install updated an already installed add-on then this will be a reference to the old version (that may still be active if needsRestart is true). This will be null otherwise.


==onUninstalled==
==onUninstalled==


Called when an add-on is uninstalled.
Called when an add-on has been uninstalled.


;addon :The [[#Addon|Addon]] that has been uninstalled
;addon :The [[#Addon|Addon]] that has been uninstalled
;needsRestart :True if an application restart is necessary for the change to take effect


==onOperationCancelled==
==onOperationCancelled==
canmove, Confirmed users
1,570

edits