domevents

0.2.0 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    2
  • 0.0.1
    1

Package Sidebar

Install

npm i domevents

Weekly Downloads

3

Version

0.2.0

License

none

Last publish

Collaborators

  • dodo