setTimeout并不总是在Greasemonkey中工作

JoP*_*JoP 4 greasemonkey settimeout

我发现了很多类似的问题,但没有一个问题,没有正确的解决方案.这是一个非常奇怪的问题.

我有一个简单的Greasemonkey脚本来测试问题:

// ==UserScript==
// @name        testdiddio
// @namespace   http://userscripts.org/users/useridnumber
// @include     https://www.google.it/
// @version     1
// ==/UserScript==


function wait(){
    console.info("wait");
    setTimeout(wait,1000);
}

console.info("start");
wait();
Run Code Online (Sandbox Code Playgroud)

这是firebug的输出:

start
wait
wait
wait
wait
Run Code Online (Sandbox Code Playgroud)

wait()函数被调用4次然后停止.如果我将超时设置为100毫秒,则呼叫似乎至少工作10/15秒然后停止.

我正在使用:Firefox 12.0 Greasemonkey 0.9.19

Bro*_*ams 6

这是Greasemonkey 0.9.19中的一个错误.
增加了一个功能,让setTimeout()工作,即使一个网页的JS是禁用,它引入了一些并发症(问题1549,15521553等).

它应该在0.9.20版本中很快解决,或者恢复到版本0.9.18.