setTimeout

Paul Chitescu konq-e@mail.kde.org
Thu, 21 Nov 2002 22:48:23 +0200


> Hi all, I am using konqe in a Linux Ipaq with familiar 0.6.
> I have some pages with calls to setTimeout but I am experiencing
> problems if the function that get called tries to load an image.
>
> Has anyone experienced any problem with setTimeout() before?
> Which version of Javascript is konqe compliant? I've read that I could
> use setInterval() in JavaScript 1.2
>
>
> Thanks very much in advance
> Adrian

setTimeout() has problems if you set or clear them often. Having more than
one running means trouble.

setInterval() works too but since usually you start it and leave it running
the problems don't show up. Don't forget you should clear it with
clearInterval() and also set some semaphores so that you don't enter
recursively if doing something lengthy.

BTW, even setTimeout gets reentered if, say, you display an alert() - this
shouldn't happen as it's supposed to be one-shot... BUG!

The Javascript implementation in Konq/E is that found in KDE-2.2.2 which is
quite buggy and some more bugs were indirectly added in the embedded version
:-/


Paul Chitescu

--
 Paul Chitescu
 pchitescu@null.ro   http://pchitescu.null.ro/   ICQ:22641673
 Any spammers will be painfully squeezed into /dev/null