src/core/base/wnComponent.js
function (eventName,handler) {
			var event;
			if (event = this.getEvent(eventName))
			{
				if (!event.addListener(handler))
					this.e.log('Invalid handler sent to event `'+eventName+'` on `'+this.getConfig('id')+'`','warning');
			} else
				this.e.log('Not existent event `'+eventName+'` on `'+this.getConfig('id')+'`','warning');
			return this;
		}
function (eventName,handler) {
			var event;
			if (event = this.getEvent(eventName))
			{
				if (!event.addListener(handler))
					this.e.log('Invalid handler sent to event `'+eventName+'` on `'+this.getConfig('id')+'`','warning');
			} else
				this.e.log('Not existent event `'+eventName+'` on `'+this.getConfig('id')+'`','warning');
			return this;
		}
function ( eventName , handler ) { var event ; if ( event = this . getEvent ( eventName ) ) { if ( ! event . addListener ( handler ) ) this . e . log ( 'Invalid handler sent to event `' + eventName + '` on `' + this . getConfig ( 'id' ) + '`' , 'warning' ) ; } else this . e . log ( 'Not existent event `' + eventName + '` on `' + this . getConfig ( 'id' ) + '`' , 'warning' ) ; return this ; }
Add a new listener to the event, if it exists
@param string $eventName event name
@param function $handler event handler
@return this
Add a new listener to the event if it exists