.new Component(paramsopt, instructionsopt)
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
Object
|
<optional> |
The parameters object. |
instructions |
Object
|
<optional> |
The instructions object. |
Extends ModuleSystem
Members
(private) ._wait :Array
Array of promises that should be resolved before Component is ready.
- Source:
.defaults :Object
Default values for parameters
- Default Value:
{ modules: [], manager: true }
- Source:
.isDeffered :Boolean
Returns whether the object is async
(wait
promises are more than 0
).
- Source:
.manager :ModuleManager
Returns the ModuleManager
used for this component.
- Source:
.native :Object
Returns the native
object used for this component.
- Source:
Methods
.add(object) → {Promise}
Add a child Component
.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
object |
Component
|
Component that should be added as a |
.addTo(object)
Adds this
Component to specified App
/Component
.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
object |
Component
|
Component that will be a parent of |
.copy(source, customizeopt) → {this}
Copy source native and integrate modules
to it.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
source |
Component
|
Source component that is used for |
|
customize |
function
|
<optional> |
Callback executed before modules integration process. |
.defer(func)
Execute func
(Callback) when Component is ready.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
func |
function
|
Callback. |
.remove(object)
Remove a child Component
.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
object |
Component
|
Component that should be a child of this Component. |
.wait(promiseopt) → {Promise}
Wait for a promise.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
promise |
Promise
|
<optional> |
The promise that should be added to a queue. |