addEvent / removeEvent
For adding and removing event listeners
# addEvent Arguments
Returns a handy off function that uses no arguments, to remove the added event
| name | type | description |
|---|---|---|
| node | node | reference to the node on which to add the event listener |
| type | string | event listener to add, example click. Types are case sensitive, as regular event listeners |
| handler | fn | {handleEvent:fn, once?:bool, passive?:bool, etc?:bool} | handler to run once the event is triggered |
# removeEvent Arguments
Returns a handy on function that uses no arguments, to add the event back
| name | type | description |
|---|---|---|
| node | node | reference to the node from which to remove the event listener |
| type | string | event listener to remove, example click. Types are case sensitive, as regular event listeners |
| handler | fn | {handleEvent:fn, once?:bool, passive?:bool, etc?:bool} | reference to the handler that has been added using addEvent |