Friday, September 18, 2009

What I Learned Today

It's a little thing that comes from trying to wing it and not having a reference book, but I learned that Javascript's setTimeout is a delay before the command the relevant command, not after. For some reason I wanted it to be the sort of timeout that means to bail out of starting that process if you don't complete it within the time interval. It's not. It means run that command after a delay of this many milliseconds which is a different creature entirely.

setTimeout(thatCommand, this)

No comments:

Post a Comment