JavaScript and function.call and function.apply for async execution
Posted by: Rick Strahls WebLog,
on 10 Aug 2006 |
View original | NEW Bookmarked: 0 time(s)
A while back I posted about a JavaScript issue that I’ve run into quite commonly with callbacks and in working around DOM elements that don’t want to update properly until UI control returns to them. In those scenarios it’s essential to delay execution of a function call. You can then use window.setTimeout() to delay the execution easily enough;
Where this gets tricky is if you need to pass parameters and the question is how do you pass parameters to these calls. I’ve...