issue 17: added check for timeout == 0 to avoid calling setTimeout in browseer
1.2.2