Frontend Modules / js/utils/wrapped-events / on
Function: on()
on(
el,event,handler):void
Defined in: js/utils/wrapped-events.ts:20
Wrapper around Element.addEventListener that keeps track of the handlers so you can use the off function
Parameters
el
Element
the element that should rect on event
event
the event name
keyof HTMLElementEventMap | "action-confirmed"
handler
(event) => void
the listener to attach
Returns
void