-
• #2
There's similar on Espruino:
- http://www.espruino.com/Reference#l_Object_removeAllListeners
- http://www.espruino.com/Reference#l_Object_removeListener
Eg:
function foo(d) { console.log(d); } Serial1.on("data", foo); Serial1.removeListener("data", foo);
- http://www.espruino.com/Reference#l_Object_removeAllListeners
How can I remove an event listener once I don't need it anymore?
I found that HTML elements normally provide a
removeEventListener
method, but how can I do that on the Espruino, especially on the Bangle?