Back to Top

Friday, June 06, 2008

Possible problem with Opera and setTimeout / clearTimeout

I've not been able to reproduce this with the new 9.27 release, however I'm quite sure that it is an issue in 9.25:

When you use setTimeout, you have two options: either passing a function reference or a string which gets eval-ed. In either case setTimeout is supposed to return an integer ID which can be used with clearTimeout. However I found that with Opera 9.25 the returned ID was 0 for calls which used strings and that doing a clearTimeout with this value had no effect (ie the code still got executed). However I can't reproduce it with 9.27, so everything is good now.


Post a Comment

You can use some HTML tags, such as <b>, <i>, <a>. Comments are moderated, so there will be a delay until the comment appears. However if you comment, I follow.