What would be nice is if we could have a good way of watching a variable. Maybe a built in way to create a custom event emitter. Sebastian Malton I agree, Promises easily allow you to do this. Even if you wanted to 'wait' on an event, you can either. 1. Use EventEmitter and simply have an 'on' handler 2. Create a promise and pass the resolve function to whatever js doing the work, and `await` on the promise itself You can also wrap an event emitter callback with a promise, oe use something like RxJS for Observables. So many possibilities. On Fri, May 11, 2018, 4:56 PM Michał Wadas <[email protected]> wrote:
| ||
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

