api backward compatibly event chaining
This commit is contained in:
parent
39f10ffecf
commit
302931bfaf
1 changed files with 7 additions and 1 deletions
|
|
@ -59,6 +59,12 @@
|
|||
// add show() to catalog for API
|
||||
CATALOG.show = showCatalog;
|
||||
|
||||
// patch broker for api backward compatibility
|
||||
EVENT.on = (topic, listener) => {
|
||||
EVENT.subscribe(topic, listener);
|
||||
return EVENT;
|
||||
};
|
||||
|
||||
const PMODES = {
|
||||
SPEED: 1,
|
||||
TOOLS: 2
|
||||
|
|
@ -307,7 +313,7 @@
|
|||
file: showHelpFile
|
||||
},
|
||||
event: {
|
||||
on: (t,l) => { EVENT.subscribe(t,l) },
|
||||
on: (t,l) => { return EVENT.on(t,l) },
|
||||
emit: (t,m,o) => { EVENT.publish(t,m,o) },
|
||||
bind: (t,m,o) => { return EVENT.bind(t,m,o) },
|
||||
import: loadFile,
|
||||
|
|
|
|||
Loading…
Reference in a new issue