donner handles dom events
dispatch an Event with an optional data object from a DOM Node or any EventTarget
Parameters
element
EventTargettype
stringdata
any (optional, default{}
)
listen to events dispatched by a DOM Node or any EventTarget
Parameters
dispatch a global Event with an optional data object from the document Object
Parameters
type
stringtarget
EventTargetdata
any (optional, default{}
)
parses the event object and creates a flat Object with all commonly used attributes like {target, currentTarget, type, ...data}
Parameters
event
CustomEvent
Returns Object eventObject