mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
30 lines
638 B
JavaScript
30 lines
638 B
JavaScript
'use strict';
|
|
|
|
import { altThirdParty } from '../alt';
|
|
import EventActions from '../actions/event_actions';
|
|
|
|
|
|
class DebugHandler {
|
|
constructor() {
|
|
let symbols = [];
|
|
|
|
for (let k in EventActions) {
|
|
if (typeof EventActions[k] === 'symbol') {
|
|
symbols.push(EventActions[k]);
|
|
}
|
|
}
|
|
|
|
this.bindListeners({
|
|
onWhateverEvent: symbols
|
|
});
|
|
}
|
|
|
|
onWhateverEvent() {
|
|
let args = arguments[0];
|
|
let symbol = arguments[1];
|
|
console.debug(symbol, args);
|
|
}
|
|
}
|
|
|
|
export default altThirdParty.createStore(DebugHandler, 'DebugHandler');
|