codeshow
codeshow copied to clipboard
canvasball - setInterval is still working after going back to main page
There is no unload event that would stop running calculation by clearInterval(interval); . When you set breakpoint you will see that it runs continuously. When you go back and forth then there will be two instances calculating position.