As I understand it, the setTimeout
function creates a new thread that waits for x milliseconds before executing the JavaScript function.
setTimeout(functionName, timeInms);
My question is: Is there a way to instruct it to run after all other JS on the page has finished executing? This timing would vary based on the amount of JS present and cannot be determined by a set number of milliseconds.
This query pertains to a larger issue that I previously discussed here:
link text
The problem lies in ScriptManager's lack of execution order guarantee, requiring me to run the EndScript
function at the very end. While using setTimeout
somewhat solves this, it isn't entirely accurate due to variations in the JS content across pages.