springroll.ApplicationPlugin Class
Responsible for creating properties, methods to
the SpringRoll Application when it's created.
var plugin = new ApplicationPlugin();
plugin.setup = function()
{
this.options.add('customOption', null);
};
Constructor
springroll.ApplicationPlugin
Parameters:
-
[priority=0]
Int
optional
The priority, higher priority
plugins are setup, preloaded and destroyed first.
preload
The function to call right before the application is initailized.
This function is bound to the Application. preload
takes
a single parameter which is a call back to call when
the asyncronous event is completed.
Parameters:
-
done
Function
The event to call when complete
setup
()
When the application is being initialized. This function
is bound to the Application. This should be overridden.
teardown
()
When the application is being destroyed. This function
is bound to the Application. This should be overridden.
priority
Int
private
The priority of the plugin. Higher numbers handled first. This should be set
in the constructor of the extending ApplicationPlugin.
Default: 0