I understand that the setTimeout
function spawns a separate thread that waits for x milliseconds before executing the JS function
setTimeout(functionName, timeInms);
My question is if there's a way to tell it to run after the JS on the page has completed executing? Since this depends on how much JS is on the page, this cannot be an absolute number.
This is a part of a bigger problem I have that I had posted here:
The gist is that ScriptManager does not guarantee the order of execution and I have to run the EndScript
function at the very end. It kinda works with the setTimeOut
although it's not very accurate (since the JS on the pages differ)