#Example
function Foo () {
EventEmitter.call(this);
}
Foo.prototype = mixin(Object.create(EventEmitter.prototype), {
doSomeThing: function () {
var data = {};
//....
this.emit("doneSomeThing", data)
}
});
var f = new Foo();
f.on("doneSomeThing", function(data){
alert(data);
});