A
Antoine
Hello,
Does anybody know a way to retreive the running timers (their ids) in a html
page?
I cannot find something in the html dom at first sight.
Is there collection of timers available (like window.all[], forms[],
frames[] and such)?
Some other way?
When you create a timer (setTimeout), the return value is the timer id.
Suppose that some script (which you do not own and cannot change) calls
setTimeout but doesn't store the id.
How to retreive it, to stop the timer (clearTimeout(id))?
I though to override the "setTimeout" like below, but that doesn't work.
Probably since the original setTimeout is used before I declare this new
one.
var oldSetTimeout=setTimeout;
var timerSaved=0;
setTimeout = new function(arg,time)
{
/*alert('timer: '+arg+', '+time);*/
timerSaved=oldSetTimeout(arg,time);
return timerSaved;
}
Greets,
P.
Does anybody know a way to retreive the running timers (their ids) in a html
page?
I cannot find something in the html dom at first sight.
Is there collection of timers available (like window.all[], forms[],
frames[] and such)?
Some other way?
When you create a timer (setTimeout), the return value is the timer id.
Suppose that some script (which you do not own and cannot change) calls
setTimeout but doesn't store the id.
How to retreive it, to stop the timer (clearTimeout(id))?
I though to override the "setTimeout" like below, but that doesn't work.
Probably since the original setTimeout is used before I declare this new
one.
var oldSetTimeout=setTimeout;
var timerSaved=0;
setTimeout = new function(arg,time)
{
/*alert('timer: '+arg+', '+time);*/
timerSaved=oldSetTimeout(arg,time);
return timerSaved;
}
Greets,
P.