I have a script that I need to bump out of the javascript execution queue. I have found that I can do this with a couple methods.
alert();//of course we can't use this one.
setTimeout(function(){
someScript();//works, but are there vulnerabilites?
}, 1);
What other methods are there and what is the correct way to bump out of the javascript execution queue?
If setTimeout is the best option, what are the vulnerabilities of using setTimeout? Are there possible future problems, possibility that the code in the timeout won't get called, speed issues, etc.