onGenericEvent

Definition

function onGenericEvent(child: HTMLElement, callback: function) {
    return HTMLElement
}

Generic List

The GenericEvent represents all the event names that can be assigned to addEventListener()

Example

function onclick(child: HTMLElement, callback: function) {
    return HTMLElement //a div container
}

Input

  • child : the reference to a valid bolt app, a bolt functional component or a valid bold variable component

  • callback : the function to be invoked when the given GenericEvent fires

Returns HTMLElement

Assings the callback to specific event to the given child and returns the HTMLElement

Last updated