Created
May 10, 2011 22:38
-
-
Save froop/965530 to your computer and use it in GitHub Desktop.
[JavaScript] Firefox4+Greasemonkey のバグ。ページ表示タイミングでalertするとsetTimeoutやAjaxが無応答
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @include http://www.google.co.jp/* | |
// ==/UserScript== | |
alert(1); setTimeout(function() { alert(2) }, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
回避策は、直接のalertをsetTimeoutで間接的な形に変える。
setTimeout(function() { alert(1) }, 0);
setTimeout(function() { alert(2) }, 0);