How to make a component support event mechanism

The event module is an independent component. There are two approaches to make an object support event. One is inherit and the other is compose.
function eventSupport(){
	//the below is compose type
	this.eventRes = new BTTEventMng();
}
function eventSupport(){
}
eventSupport.extend(BTTEventMng);//inherit