Methods
# _setObserver(key, val)
Set an observer given a key and a value.
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
Property name. |
val |
*
|
Value of the property. |
# append(node)
Append a DataNode to this DataNode.
Parameters:
Name | Type | Description |
---|---|---|
node |
DataNode
|
DataNode to append. |
# find(id)
Find a children DataNode by the id.
Parameters:
Name | Type | Description |
---|---|---|
id |
string
|
Id of the DataNode. |
# get(key, defaultValue)
Get the value for key, if not exists go to parent node to get it until root node.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
key |
string
|
||
defaultValue |
*
|
null | Default value. |
# set(…key)
Set property to the node.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
args
|
<repeatable> |
It accepts 2 parameters with key and value or an array with objects. |
# subscribe(prop, func)
Subscribe function to property.
Parameters:
Name | Type | Description |
---|---|---|
prop |
string
|
Property to subscribe. |
func |
function
|
Function to launch. |