kopia lustrzana https://github.com/c9/core
41 wiersze
874 B
JavaScript
41 wiersze
874 B
JavaScript
define(function(require, exports, module) {
|
|
main.consumes = ["Plugin"];
|
|
main.provides = ["myplugin"];
|
|
return main;
|
|
|
|
function main(options, imports, register) {
|
|
var Plugin = imports.Plugin;
|
|
|
|
/***** Initialization *****/
|
|
|
|
var plugin = new Plugin("Ajax.org", main.consumes);
|
|
var emit = plugin.getEmitter();
|
|
|
|
function load() {
|
|
|
|
}
|
|
|
|
/***** Methods *****/
|
|
|
|
|
|
|
|
/***** Lifecycle *****/
|
|
|
|
plugin.on("load", function() {
|
|
load();
|
|
});
|
|
plugin.on("unload", function() {
|
|
|
|
});
|
|
|
|
/***** Register and define API *****/
|
|
|
|
plugin.freezePublicAPI({
|
|
|
|
});
|
|
|
|
register(null, {
|
|
"myplugin": plugin
|
|
});
|
|
}
|
|
}); |