demo在此:http://spmjs.io/docs/arale-events-test/examples/index.html
seajs.use('arale-events-test/1.0.0/index', function(araleEventsTest) {
function a(){
};
araleEventsTest.mixTo(a);
a.prototype.say = function(){
this.trigger('say');
};
var b1 = new a();
b1.on('say',function(){
console.log('b1 says');
});
var b2 = new a();
b2.on('say',function(){
console.log('b2 says');
});
b2.say();
//b1 says
//b2 says
});
demo在此:http://spmjs.io/docs/arale-events-test/examples/index.html