ensemble.Data
#
ensemble- ensemble
- ~Data
- new Data(ns, obj)
- instance
- static
- .isData() โ
boolean
- .isData() โ
- ~Data
#
ensemble~DataData is a multi-purpose utility object.
It could be used as a wrapper around a Compo composition, this object can store any kind of properties.
Kind: inner class of ensemble
- ~Data
- new Data(ns, obj)
- instance
- static
- .isData() โ
boolean
- .isData() โ
#
new Data(ns, obj)Constructor method.
Param | Type | Description |
---|---|---|
ns | string | Data namespace |
obj | object | A starter Object |
Example
string
#
data._Symbol.toStringTag โ Getter for Symbol property, returns the symbolic name for ensemble.Data class.
Kind: instance property of Data
See: Symbol.toStringTag
Todo
- return undef
- backward compatibility
mixed
#
data.compo(tag, name, props, defer, fresh, stale) โ The compo method is a utility render.
When you create a composition with this method, it will create a Compo composition or simply an Object placeholder. With the defer render you can have it rendered in place, refresh, or freeze.
Kind: instance method of Data
Returns: mixed
- compo - An ensemble.Compo element -or- an Object placeholder
Param | Type | Default | Description |
---|---|---|---|
tag | string | Element node tag -or- component name | |
name | string | ||
props | object | Properties for Element node -or- component | |
defer | boolean | false | Defer render for composition |
fresh | mixed | false | A function callback, called when is loaded the compo |
stale | mixed | false | A function callback, called when is unloaded the compo |
#
data.render(slot)Renderizes a composition, passed by reference.
Kind: instance method of Data
Param | Type | Description |
---|---|---|
slot | mixed | Reference of the element that will be rendered |
#
data.stale(slot)Freezes a composition, passed by reference.
Kind: instance method of Data
Param | Type | Description |
---|---|---|
slot | mixed | Reference of the element that will be rendered |
#
data.reflow(slot, force)Refresh a composition, passed by reference.
Kind: instance method of Data
Param | Type | Description |
---|---|---|
slot | mixed | Reference of the element that will be rendered. |
force | boolean | It forces the reflow. |
boolean
#
Data.isData() โ Check if passed object is an ensemble.Data instance.
Kind: static method of Data
Todo
- backward compatibility