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

Unified Diff: client/samples/swarm/App.dart

Issue 8363040: Implement measurement using futures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove duplicated imports from html.dart Created 9 years, 2 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 | « client/samples/dartcombat/views.dart ('k') | client/samples/swarm/SwarmViews.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/samples/swarm/App.dart
diff --git a/client/samples/swarm/App.dart b/client/samples/swarm/App.dart
index c9659584b5f7d0f79f9077b903655e15a0e5b57e..95eadb8629a6da333d54426478e5d615aa464944 100644
--- a/client/samples/swarm/App.dart
+++ b/client/samples/swarm/App.dart
@@ -25,7 +25,9 @@ class App {
if (document.readyState == "interactive" ||
document.readyState == "complete" ||
document.readyState == "loaded") {
- this.onLoad();
+ // We use setTimeout to insure that onLoad is always called in an async
+ // manner even if the document is already loaded.
+ window.setTimeout(() => onLoad(), 0);
} else {
window.on.contentLoaded.add(
// TODO(sigmund): Consider eliminating the call to "wrap", for
« no previous file with comments | « client/samples/dartcombat/views.dart ('k') | client/samples/swarm/SwarmViews.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698