facebookarchive/emitter

Can I use multiple `once` to register the same event?

Closed this issue · 2 comments

Suppose I have the following code:

electron_1.app.once('open-file', function (e, p) {
    process.argv.push(p);
    e.preventDefault();
});

electron_1.app.once('open-file', function (e, p) {
    // log the event
   console.log('open ' + p);
    e.preventDefault();
});

Only one of the events will be received. Is it the expected behavior?

Opps. Electron's once function is not fbemitter's once function.
Sorry.

No worries :)