setTimeout("thread(obj)",0)

G

gert

is there any way i can make setTimeout work with a private obj ?

function() {
var obj
setTimeout("thread(obj)",0)
}
 
P

Peter Michaux

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);
}

Peter
 
G

gert

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);

}

Thank you very much :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
EmeliaBryc

Latest Threads

Top