How JavaScript Timers Work
ejohn.org
ejohn.org
As seanalltogether mentions, timers are run at the beginning of the render loop => "Run timers, layout page, render page, repeat". If you're busy doing stuff in #2 or #3 (or if your timer handler takes forever), you're not running #1.
For this reason your event pool can be delayed significantly while waiting for rendering to complete.
Its inconsistent implementation meant you really are best doing any style modifications off the dom and then reattaching when complete