I have the following line in my javascript code
setTimeout(reload(), 30000);
Which I expect to wait 30 seconds then call the reload function.
The issue is that the reload function is being called right away and not waiting for the timeout, why is the setTimeout
calling the reload function right away and not waiting the specified amount of time? The setTimeout
call is also being done in an onloadend
FileReader
function if that would make any difference.