Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: lib/compiler/implementation/emitter.dart

Issue 10702112: Make sure we do not try to run main() before the document has been fully loaded. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/emitter.dart
diff --git a/lib/compiler/implementation/emitter.dart b/lib/compiler/implementation/emitter.dart
index bfb5d771015487ca79d9438d287c0ba25477058c..04072dfa87d7c2564b98b73d5dd1f419ad8f38ce 100644
--- a/lib/compiler/implementation/emitter.dart
+++ b/lib/compiler/implementation/emitter.dart
@@ -988,7 +988,7 @@ $mainEnsureGetter
}
buffer.add("""
if (typeof window != 'undefined' && typeof document != 'undefined' &&
- window.addEventListener && document.readyState == 'loading') {
+ window.addEventListener && document.readyState != 'complete') {
window.addEventListener('DOMContentLoaded', function(e) {
${mainCall};
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698