3 ms·
> Anything wrong with that? It only works in browser environments.
by briantakita 3y ago
> Anything wrong with that?
It only works in browser environments.
- lelandfe 3y agoNode has EventEmitter: https://nodejs.org/en/learn/asynchronous-work/the-nodejs-event-emitter https://nodejs.org/en/learn/asynchronous-work/the-nodejs-eve... See, for instance, https://www.electronjs.org/docs/latest/api/ipc-renderer https://www.electronjs.org/docs/latest/api/ipc-renderer
- briantakita 3y agoBrowser environments don't have EventEmitter. Different event APIs between browsers & nodejs. A library (3rd party or custom) is needed to make event code isomorphic.