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
| 归档时间: |
|
| 查看次数: |
2652 次 |
| 最近记录: |