kaboom
kaboom copied to clipboard
Loop() function executes immediately and before returning EventCanceller
Version
master
What browsers are you seeing the problem on?
No response
What happened?
I'm using 2000.2.8 but master has the same code for loop()
Trying to cancel loop immediately using event canceller function causes "x is not a function" if it happens in the first iteration.
What's the expected behavior?
User function should be delayed and called after returning event canceller.
Minimum reproducable code
kaboom()
let cancelLoop
cancelLoop = loop(365 * 24 * 60, () => {
cancelLoop()
})
Live demo
No response