get list of event names
This commit is contained in:
parent
8d915881af
commit
830fc367fd
@ -6,8 +6,6 @@ let lib = require('bindings')('vcd.node');
|
|||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
|
|
||||||
const triggers = [];
|
|
||||||
|
|
||||||
const info = {path: []};
|
const info = {path: []};
|
||||||
|
|
||||||
const s = new stream.Writable();
|
const s = new stream.Writable();
|
||||||
@ -27,10 +25,9 @@ module.exports = () => {
|
|||||||
|
|
||||||
s.change = {
|
s.change = {
|
||||||
on: (id, fn) => {
|
on: (id, fn) => {
|
||||||
triggers.push(id);
|
|
||||||
const triggerString = triggers.join(' ') + ' ';
|
|
||||||
lib.setTrigger(cxt, triggerString);
|
|
||||||
triee.on(id, fn);
|
triee.on(id, fn);
|
||||||
|
const triggerString = triee.eventNames().join(' ') + ' ';
|
||||||
|
lib.setTrigger(cxt, triggerString);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user