ch.Component
Description
Base class for all components.
How-to
Parameters
-
el
- HTMLElement : It must be a HTMLElement. -
options
- Object : Configuration options.
Extends
- tiny.EventEmitter
Properties
.Component#name
String
The name of a component.
.uid
Number
A unique id to identify the instance of a component.
Methods
.constructor()
Returns a reference to the constructor function.
.destroy()
Destroys an instance of Component and remove its data from asociated element.
.disable() → {component}
Disables an instance of Component.
.enable() → {component}
Enables an instance of Component.
.require() → {component}
Adds functionality or abilities from other classes.
Events
'destroy'
Emits when a component is destroyed.
'disable'
Emits when a component is disable.
'enable'
Emits when a component is enabled.
'ready'
Event emitted when the component is ready to use.