sapo/Ink — pull request #239 by mariomc (2013-12-10 12:08:03+00:00)
Title: Adding bean library to events

Opening this as a pull request of its own. Follow-up of #238.

Adding [Bean] (https://github.com/fat/bean) lib to handle Events.

Bean is a small, fast, cross-platform, framework-agnostic event manager designed for desktop, mobile, and touch-based browsers.

It exposes a simple, powerful and expressive API that consists of 5 simple methods ( [on](https://github.com/fat/bean#on), [one](https://github.com/fat/bean#one), [off](https://github.com/fat/bean#off), [fire](https://github.com/fat/bean#fire), [clone](https://github.com/fat/bean#clone)).
As for major changes and features, we have:
* Event namespacing
* Event Delegation to a selector or set group of elements
* Creating and firing custom events in a cross browser fashion
* The API isn't limited to DOM elements so it can act as a Pub/Sub for JS objects
* Adds support for mouseenter and mouseleave events
* Normalizes the Event object properties and methods, along with target, stop, preventDefault and stopImmediate

Overall good stuff, specially useful in UI modules. Opens up a potential event hook architecture for the UI modules.

This lib is also a pre-req for the Gestures (Hammer.js) module.