load_modules
- AbstractItem.load_modules(module_array, callback)
- Domain:
client
- Language:
javascript
- Class:
Description
Use load_modules method to dynamically load specified modules before executing the callback.
The method works the same way as
load_module,
only loads and initializes all modules of items specified in the
module_array.
Parameters
Parameter |
Type |
Description |
|---|---|---|
|
|
The list of modules to load and initialize. |
|
|
Example
Bellow, the do_some_work function is executed only when modules of the item and its owner has been loaded:
function some_work(item) {
item.load_modules([item, item.owner], do_some_work);
}
function do_some_work(item) {
// some code
}
See also
Related functions
Related concepts