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

Unified Diff: samples/swarm/App.dart

Issue 12218131: Combine window.setTimeout/setInterval with Timer and Timer.repeating. Also (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « samples/isolate_html/isolate_sample.dart ('k') | samples/swarm/SwarmViews.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/App.dart
diff --git a/samples/swarm/App.dart b/samples/swarm/App.dart
index 2837320a1de5c78028cf056780a3800701ee550e..376a17d3dbd2069a1dc76fe57d43f2015b93c9e3 100644
--- a/samples/swarm/App.dart
+++ b/samples/swarm/App.dart
@@ -27,9 +27,9 @@ class App {
if (document.readyState == "interactive" ||
document.readyState == "complete" ||
document.readyState == "loaded") {
- // We use setTimeout to insure that onLoad is always called in an async
+ // We use a timer to insure that onLoad is always called in an async
// manner even if the document is already loaded.
- window.setTimeout(() => onLoad(), 0);
+ Timer.run(onLoad);
} else {
window.onContentLoaded.listen(
// TODO(sigmund): Consider eliminating the call to "wrap", for
« no previous file with comments | « samples/isolate_html/isolate_sample.dart ('k') | samples/swarm/SwarmViews.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698