ok.js
function (obj, event, fn, context) {
		var listeningTo = this._listeningTo || (this._listeningTo = {});
		var id = obj._listenId || (obj._listenId = eventIndex++);
		listeningTo[id] = obj;
		if (!fn && typeof event === 'object') {
			fn = this;
		}
		if (!context) {
			context = this;
		}
		obj.on(event, fn, context);
	}
function (obj, event, fn, context) {
		var listeningTo = this._listeningTo || (this._listeningTo = {});
		var id = obj._listenId || (obj._listenId = eventIndex++);
		listeningTo[id] = obj;
		if (!fn && typeof event === 'object') {
			fn = this;
		}
		if (!context) {
			context = this;
		}
		obj.on(event, fn, context);
	}
function ( obj , event , fn , context ) { var listeningTo = this . _listeningTo || ( this . _listeningTo = { } ) ; var id = obj . _listenId || ( obj . _listenId = eventIndex ++ ) ; listeningTo [ id ] = obj ; if ( ! fn && typeof event === 'object' ) { fn = this ; } if ( ! context ) { context = this ; } obj . on ( event , fn , context ) ; }
Observe another object by adding a callback to its event queue which is
executed when an event fires
@param {Events} obj Object to listen to
@param {string} event Event name
@param {Function} fn Callback function. Executed when event fires.
@param {*=} context Optional context to apply to callback
Observe another object by adding a callback to its event queue which is executed when an event fires