• In Espruino, on is part of every object, so you can find the docs at http://www.espruino.com/Reference#l_Obje­ct_on

    Calling on twice is no problem, but then you end up with both functions getting called. You can use .removeListener or .removeAllListeners to get rid of old ones (I'd recommend not using removeAllListeners as it may interfere with widgets that had registered their own handlers).

    Examples of use are at that link above

  • Ah, a very basic question fitting here which I wanted to ask since two years: What happens to event listeners and set intervals on Bangle.js, when the app is changed to another one (and therefore quit)? I suppose all listeners and intervals are cleaned up. Is this right?

About

Avatar for Tx @Tx started