triggerEvent
Callable
Parameters
el: EventTarget = eventTarget
The element or EventTarget to trigger the event upon
type: string
The event type name
detail: unknown = null
The event detail to be sent
Returns boolean
false if event is cancelable and at least one of the event handlers which received event called Event.preventDefault(). Otherwise it returns true.
Small utility to trigger a custom event for a given EventTarget.
or it can trigger event on the eventTarget itself