node.js eventemitter api for dom events
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.npmignore
Gruntfile.coffee
README.md
package.json

README.md

domevents

This Package provides the EventEmitter API for DOM Events.

usage

DomEventEmitter = require('domevents').EventEmitter; // if you have a require available
DomEventEmitter = window.DomEventEmitter; // if you are in the browser

var div = new DomEventEmitter(document.getElementById('div'), false);
div.on('click', function (event) {
    /* do something here */
});

First argument is the element from which you want to receive the events (defaults to document).

Second argument is the useCapture argument of the normal DOM API.