HTML5
specifications声明setTimeout可以在没有附加“timeout”参数的情况下运行,该参数应该在调度函数“handler”之后多少毫秒之后说明.
handle = window . setTimeout( handler [,timeout [,arguments ] ] ) Schedules a timeout to run handler after timeout milliseconds. Any arguments are passed straight through to the handler.
但是,我没有找到解释当没有设置“超时”时间段时会发生什么的任何地方.
一个示例用法是animation implementation在Raphael库中.
animationElements[length] && win.setTimeout(animation);
解决方法
见
http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#get-the-timeout
- Let timeout be the second argument to the method,or zero if the argument was omitted.