Core Application
The Core Application manages the life cycle of modules.
Eric Bréchemier © 2011, Some Rights Reserved Legal-Box SAS © 2010-2011, All Rights Reserved
BSD License http://creativecommons.org/licenses/BSD/
2011-08-14
lb. | Core Application |
Functions | |
setOptions(options) | Configure a set of option properties. |
getModules(): array | Get the list of modules added in the application. |
addModule(module) | Add a new module to the application. |
removeModule(module) | Remove a module from the application. |
startAll() | Start all registered modules. |
endAll() | Terminate all registered modules. |
run() | Run the application. |
Configure a set of option properties.
Each new option is added to the configuration, replacing any existing value of the same name. Options previously set are otherwise preserved.
lbBuilder | builder used in lb.core.Module to create an instance of the Sandbox for the new module from a selection of plugins which define different parts of the Sandbox API. Defaults to lb.core.plugins.builder, which creates a Sandbox with all the plugins defined in the framework. Use of a custom builder allows to customize the Sandbox API by loading custom plugins besides or instead of the plugins defined in the framework. |
lbFactory | factory used in the Sandbox methods to create and destroy DOM elements, DOM listeners and DOM events, and used in lb.core.Module to “initialize” the box elements of a new module. Defaults to lb.base.dom.factory. Use of a custom factory allows to “initialize” the box by creating widgets associated with DOM elements within which, for example, carry particular CSS class names. |
options | object, a hash of configuration properties. |