-
• #2
..I assume passing
undefined
for the function does the job... --- and if not, then just provide an 'empty' / nop function:function(){}
...()=>
(latter I'm not sure about). -
• #3
I assume passing undefined for the function does the job...
That'll just add another handler...
You'll need
Bangle.removeAllListeners('accel')
: http://www.espruino.com/Reference#l_Object_removeAllListeners -
• #4
@allObjects passing
null
for the function producesUncaught TypeError: Second argument to EventEmitter.on(..) must be a function or a String (containing code)
And I do not want to provide a dummy function, since removing an event handler may (now or later) be used for internal optimization (as no handler has to be called if none has been provided)
@Gordon great, thank you! Is there also a possibility to uninstall a specific handler only?
-
• #5
...ddddoohh (to myself)
Hello!
Besides the pure "fun" experiments published before, I'm also preparing some "professional" experiments to be run as soon as I will get my developer preview of Bangle.js
This is why the following question came up: I know that I can install an event handler for the Accelerometer using
But, how do I deinstall that handler again?