Open GoogleCodeExporter opened 9 years ago
[deleted comment]
Thank you for reporting.
Original comment by kato.kaz...@gmail.com
on 25 Dec 2007 at 1:46
While investigating how Chrome handles userscripts I noticed that it loads
scripts in a nondeterministic
manner too. On a hunch, I checked and it seems the same code that works under
Chrome works under
GreaseKit.
The code is this:
if (document.readyState == "complete") {
myfunc();
} else {
window.addEventListener("load", myfunc, false);
}
When the onload() has already fired, document.readyState is set to "complete"
so the script can do work
straight away. Otherwise, the script knows to wait for onload to fire.
Since scripts can be updated to deal with this non-deterministic loading and
since it's required for scripts to
run under Chrome I suspect this bug should be closed as wontfix.
Original comment by a1291...@gmail.com
on 14 Apr 2010 at 1:36
Original issue reported on code.google.com by
a1291...@gmail.com
on 4 Dec 2007 at 10:24Attachments: