-
Notifications
You must be signed in to change notification settings - Fork 327
-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Invalid arguments to GM_util.hitch() when trying to use setTimeOut() #1552
Comments
yes, I got the same problem. the same code worked just fine yesterday, and today it doesn't work anymore. I checked the add-ons in FF, it just updated the GM to 0.9.19, and it doesn't work anymore! |
Note: This only happens when using a string as first parameter to
|
I had it happening with either of these cases, so maybe when it parses a string?
if(count>2){
console.log('Delete');
setTimeout('document.getElementById("del").click()',4000);
} else {
console.log('Next');
setTimeout(function(){window.location.href = 'page.php?id=2'}, 4000);
}
|
I didn't think passing a string to setTimeout ever worked. Isn't that one of the "Greasemonkey pitfalls"? |
There's two separate issues
setTimeout(function() { alert('foo1'); }, 1000); //This works setTimeout(function() { alert('foo2'); }, 5000); //This fails silently setTimeout("alert('foo3')", 2000); //This fails with GM_util error |
This reverts commit 7eccacb. Fixes greasemonkey#1549, greasemonkey#1552, greasemonkey#1553 Refs greasemonkey#1209
Affecting:
FF 12.0
GS 0.9.19
Rolling back to 0.9.18 fixes the issue.
When a script is using setTimeOut in the Error Console I see " Error: Invalid arguments to GM_util.hitch(). "
The text was updated successfully, but these errors were encountered: