4 ms·
promisifiedWindow.setInterval(200).then(x => console.log("res:", x)); -> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} >> VM310:1
by egeozcan 10y ago
promisifiedWindow.setInterval(200).then(x => console.log("res:", x));
-> Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
>> VM310:1 res: undefined
How do you cancel the interval?
- gianlucaguarini 10y agoAt moment it's not possible and it does not make any sense to use a setInterval with a promise in return. But I will think about a simple solution to clear the timer functions
- gianlucaguarini 10y agoOk with this it should be possible https://github.com/GianlucaGuarini/allora/pull/3 https://github.com/GianlucaGuarini/allora/pull/3