springroll.ApplicationPlugin Class

Module: Core

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

(
  • [priority=0]
)

Parameters:

  • [priority=0] Int optional

    The priority, higher priority plugins are setup, preloaded and destroyed first.

Properties

preload

(
  • done
)

Defined in preload:47

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

()

Defined in setup:40

When the application is being initialized. This function is bound to the Application. This should be overridden.

teardown

()

Defined in teardown:57

When the application is being destroyed. This function is bound to the Application. This should be overridden.

priority

Int private

Defined in priority:31

The priority of the plugin. Higher numbers handled first. This should be set in the constructor of the extending ApplicationPlugin.

Default: 0