![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
is there any way i can make setTimeout work with a private obj ? function() { var obj setTimeout("thread(obj)",0) } |
#3
| |||
| |||
|
|
On Dec 14, 7:08 pm, gert <gert.cuyk... (AT) gmail (DOT) com> wrote: is there any way i can make setTimeout work with a private obj ? function() { var obj setTimeout("thread(obj)",0) } You can send a function as the first argument to setTimeout. This function's closure will contain obj. function() { var obj; setTimeout(function(){thread(obj);},0); } |

![]() |
| Thread Tools | |
| Display Modes | |
| |