0.2.0 • Published 9 years ago

eventhandler.js v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

EventHandler.js

Bower version npm version Build Status Coverage Status devDependency Status

Sauce Test Status

A simple class for handling events

Quick start

Several options are available to get started:

  • Download the latest release.
  • Clone the repo: git clone https://github.com/murrayju/EventHandler.js.git.
  • Install with Bower: bower install EventHandler.js.
  • Install with npm: npm install eventhandler.js.

Example

var evt = new EventHandler();

// Register a listener for this event
var handler = evt.on(function (someArg) {
  console.log('Event fired with arg: ' + someArg);
});

// Fire the event
evt.fire('test data');

// Unregister the listener when no longer needed
handler.off();

Credits

A big thanks to BrowserStack for providing automated cross-browser testing!

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago