Chromium Code Reviews| Index: samples/swarm/App.dart |
| diff --git a/samples/swarm/App.dart b/samples/swarm/App.dart |
| index 2837320a1de5c78028cf056780a3800701ee550e..e27b445f5f5221378aca18e8bad289e0ba629b8a 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); |
| + new Timer(const Duration(milliseconds:0), () => onLoad()); |
|
blois
2013/02/13 03:09:24
I believe this is equivalent to Timer.run, if so,
floitsch
2013/02/13 10:03:07
Yes. It is. Generally we avoid the empty "const Du
Emily Fortuna
2013/02/13 20:19:44
Done.
|
| } else { |
| window.onContentLoaded.listen( |
| // TODO(sigmund): Consider eliminating the call to "wrap", for |