If I have more than one place in the code where I need to add the exact same listenner then I found I had to keep a count so I knew I did not execute the same registration again. Otherwise I found the callback did not get called or I could not see the callback being called.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
If I have more than one place in the code where I need to add the exact same listenner then I found I had to keep a count so I knew I did not execute the same registration again. Otherwise I found the callback did not get called or I could not see the callback being called.