📄
BoltUI Docs (Preview)
  • Getting Started
    • Introduction
    • Installing Bolt
    • Hello World
  • Understanding Bolt
    • Creating UI
    • Components
    • Properties & Events
    • Styles
    • Custom Components
    • Reactivity
    • Component Lifecycle
    • Routing
  • API Reference
    • index
      • State
      • Component
      • render
      • attribute
      • event
      • onLoad
      • onRemove
      • id
      • Class
      • When
    • components
      • Link
      • AppLink
      • GenericElement
    • events
      • onGenericEvent
    • boltrouter
      • Router
      • AppRouter
      • Url
      • Navigate
      • AppNavigator
  • Future
    • Server Side Rendering
    • Multi-Platform
Powered by GitBook
On this page
  • Definition
  • Generic List
  • Input
  • Returns HTMLElement
  1. API Reference
  2. events

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

PreviouseventsNextboltrouter

Last updated 2 years ago