有没有办法发现哪个处理程序触发了事件?
例如,我的商店:
handlers: {
surahReceived(payload) {
this._surah = payload.surah;
this.emitChange();
},
ayahsReceived(payload) {
this.dispatcher.waitFor('AyahStore', function() {
this._surah.ayahs = this.dispatcher.getStore(AyahStore).getAyahs();
}.bind(this));
this.emitChange();
},
surahListReceived(payload) {
this._surahs = payload.surahs;
this.emitChange();
}
}
当最后一个函数触发时,我的听众:
statics: {
storeListeners: {
_onSurahReceived: [SurahStore]
}
},
我想知道哪个函数触发了事件