Confirmed users, Bureaucrats and Sysops emeriti
2,088
edits
(→API) |
(→API) |
||
Line 25: | Line 25: | ||
</pre> | </pre> | ||
The <code>onInstall</code> gets called on the first run of an extension. If an extension is uninstalled and reinstalled it gets called again (as the act of uninstalling removes all data associated with the add-on). <code>onUpgrade</code> get's called when an extension is upgraded. | The <code>onInstall</code> handler gets called on the first run of an extension. If an extension is uninstalled and reinstalled it gets called again (as the act of uninstalling removes all data associated with the add-on). <code>onUpgrade</code> get's called when an extension is upgraded. | ||
Nothing is passed to the <code>onInstall</code> handler. An object which contains version info for the add-on prior to being updated gets passed to <code>onUpgrade</code>. | Nothing is passed to the <code>onInstall</code> handler. An object which contains version info for the add-on prior to being updated gets passed to <code>onUpgrade</code>. |