v0.16.163 - 34.4 / 23.4

addEventListener / removeEventListener

For adding and removing event listeners

# addEventListener Arguments

Returns a handy off function that uses no arguments, to remove the added event

nametypedescription
nodenodereference to the node on which to add the event listener
typestringevent listener to add, example click. Types are case sensitive, as regular event listeners
handlerfn | {handleEvent:fn, once?:bool, passive?:bool, etc?:bool}handler to run once the event is triggered

# removeEventListener Arguments

Returns a handy on function that uses no arguments, to add the event back

nametypedescription
nodenodereference to the node from which to remove the event listener
typestringevent listener to remove, example click. Types are case sensitive, as regular event listeners
handlerfn | {handleEvent:fn, once?:bool, passive?:bool, etc?:bool}reference to the handler that has been added using addEventListener

# Snippet

# Test Events Listeners