emitit
For when you just want to listen to decent events and then do something...
Technical Overview
Emitit is abstraction on top of the DOMs native event-API. This feels to be necessary, because of weird-ish DOM-behaviour (Opinion). What you want to is to abstract events, listen for them and then act on them and specific data, not whole DOM-objects. Also this module guides the user gently to bind events as low as possible for performance reasons. While we are at it we can add CSS on a per node basis, forcibly preventing defaults, such as user-select.
For convenience the module can be called in a script tag without requiring or including it explicitly. This works after including the JS-file in the header of the HTML-document. This is because the node-style JS is build with browserify and attached to the global window
object.
Pass in options into the constructor and be ready to listen to events.
Usage
npm install emitit# and require it in your own browserify build
or
over click
TODOs
- Test-suite
- CI-builds