577
edits
No edit summary |
(→Events) |
||
Line 23: | Line 23: | ||
me = require("me"); | me = require("me"); | ||
// eventName is one of install | // eventName is one of install | ||
me.bind(eventName, callback); | me.bind(eventName, callback); | ||
Line 29: | Line 29: | ||
// These are potential convenience functions | // These are potential convenience functions | ||
me.onInstall( function ) | me.onInstall( function ) | ||
</pre> | </pre> | ||
The <code>me.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). | The <code>me.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). | ||
There does not seem to be a strong use-case for allowing for event handlers that act upon disabling and | There does not seem to be a strong use-case for allowing for event handlers that act upon disabling, enabling, and un-installing an extension. | ||
==== Declarative ==== | ==== Declarative ==== |
edits