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

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

Issue 10763002: Revert "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 bcda9f670969acc8efc2b149f7091a0e9188dbb8..4fafc8382e2482e7409c417a20dd68482343419d 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 != 'complete') {
+ window.addEventListener && document.readyState == 'loading') {
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