You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, for both, when te user saves the code, if there are leftovers like setIntervals or setTimeout or running loops, they will stay running and the new code will be instantiated, so there can be conflicts (like two intervals trying to change the color of the same component).
The text was updated successfully, but these errors were encountered:
Is it possible to automatically determine which interval/timeout IDs need to be cleared, or do we need to recommend/require that programs using such patterns should provide a cleanup function or something?
Is it possible to automatically determine which interval/timeout IDs need to be cleared, or do we need to recommend/require that programs using such patterns should provide a cleanup function or something?
We can ensure if we add a custom "window.cockpit.setInterval(...)" function and keep track of the IDs, otherwise I'm not sure.
Lago suggested something. Will talk to him.
Today, for both, when te user saves the code, if there are leftovers like
setInterval
s orsetTimeout
or running loops, they will stay running and the new code will be instantiated, so there can be conflicts (like two intervals trying to change the color of the same component).The text was updated successfully, but these errors were encountered: