Labs/Jetpack/Reboot/JEP/105: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 23: Line 23:
me = require("me");
me = require("me");


// eventName is one of install, uninstall
// 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 )
me.onUninstall( 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 enabling an extension.
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 ====
577

edits

Navigation menu