-
Notifications
You must be signed in to change notification settings - Fork 6
Container Plugin
Matt Karl edited this page Dec 3, 2015
·
3 revisions
The SpringRoll Container support dynamic plugins which can be used to add functionality to the base Container. This plugin is a simple object, which contains a handful of override-able methods, setup
, teardown
, open
, opened
, close
, closed
. These methods can be created
(function()
{
var plugin = new springroll.ContainerPlugin();
// When the Container is created
plugin.setup = function()
{
};
// When an app is being loaded
plugin.open = function()
{
// the Bellhop client is available here
// can be used to receive custom events from the client
// this.client.on('customEvent', function(event){});
};
// When an app is loaded, opened completely
plugin.opened = function()
{
};
// When an app begins closing
plugin.close = function()
{
};
// When an app fully closed
plugin.close = function()
{
};
// When Container is being destroyed, do clean-up here
plugin.teardown = function()
{
};
}());