3 ms·
Let's say you want to publish a library that for example logs the global keyboard events. If you want to simply notify any keypress in a really simple manner yo
by gianlucaguarini 11y ago
Let's say you want to publish a library that for example logs the global keyboard events. If you want to simply notify any keypress in a really simple manner you can just use myLib.On("keypress", func() {}) and no matter where the "keypress" event gets dispatched you will have always a callback listening it.