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); |
greasemonkey/greasemonkey#1318
issuesに似たようなのが上がってますね
ほんとですね。ありがとうございます。
結局、Firefox本体のバグみたいです。英語なんでよく読んでないですけどw
https://bugzilla.mozilla.org/show_bug.cgi?id=647727
回避策は、直接のalertをsetTimeoutで間接的な形に変える。
setTimeout(function() { alert(1) }, 0);
setTimeout(function() { alert(2) }, 0);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Firefox4上の Greasemonkey 0.9.2 で実行すると、2つ目のalertが発生しない。また Google Suggest もされなくなる。
当該タブを閉じない限り、Greasemonkeyスクリプト外でも他のページに遷移しても解消しない。
Firefox3系では発生しない。