BaseComponent
Extends:
The base element for all Coral components
Static Member Summary
Static Public Members | ||
public static |
tracking: TrackingEnum: * Returns BaseComponent tracking options. |
Member Summary
Public Members | ||
public |
Tracking of events. |
|
public |
The string representing the element name being tracked. |
|
public |
The string representing the feature being tracked. |
Method Summary
Public Methods | ||
public |
Get the value of a property. |
|
public |
Hide this component. |
|
public |
Remove an event listener. |
|
public |
Add an event listener. |
|
public |
set(properties: Object<String, *>, silent: Boolean): BaseComponent Set multiple properties. |
|
public |
Show this component. |
|
public |
Returns the component name. |
|
public |
Trigger an event. |
Static Public Members
Public Members
public tracking: String source
Tracking of events. This provides insight on the usage of the components. It accepts "ON" and "OFF". In order to successfully track the events, {Tracking} needs to be configured.
TrackingEnum.ON
by default.
Public Methods
public get(property: String): * source
Get the value of a property.
Params:
Name | Type | Attribute | Description |
property | String | The name of the property to fetch the value of. |
Return:
* | Property value. |
public off(eventName: String, selector: String, func: Function, useCapture: Boolean): BaseComponent source
Remove an event listener.
Params:
Name | Type | Attribute | Description |
eventName | String | The event name to stop listening for. |
|
selector | String |
|
The selector that was used for event delegation. |
func | Function | The function that was passed to |
|
useCapture | Boolean |
|
Only remove listeners with |
public on(eventName: String, selector: String, func: Function, useCapture: Boolean): BaseComponent source
Add an event listener.
Params:
Name | Type | Attribute | Description |
eventName | String | The event name to listen for. |
|
selector | String |
|
The selector to use for event delegation. |
func | Function | The function that will be called when the event is triggered. |
|
useCapture | Boolean |
|
Whether or not to listen during the capturing or bubbling phase. |
public set(properties: Object<String, *>, silent: Boolean): BaseComponent source
Set multiple properties.
public trigger(eventName: String, props: Object, bubbles: Boolean, cancelable: Boolean): CustomEvent source
Trigger an event.
Params:
Name | Type | Attribute | Description |
eventName | String | The event name to trigger. |
|
props | Object |
|
Additional properties to make available to handlers as |
bubbles | Boolean |
|
Set to |
cancelable | Boolean |
|
Set to |