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

Unified Diff: samples/calculator/calculator.dart

Issue 12212200: "Reverting 18531" (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 | « no previous file | samples/dartcombat/setup.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/calculator/calculator.dart
diff --git a/samples/calculator/calculator.dart b/samples/calculator/calculator.dart
index cd6c2b4971373d8ff0b5d1808cb8784ae6af9f13..10a0477e9a567e954d619bf4ebb1bd7c750af2ed 100644
--- a/samples/calculator/calculator.dart
+++ b/samples/calculator/calculator.dart
@@ -5,7 +5,6 @@
import 'dart:html';
import 'dart:math' as Math;
import 'calcui.dart';
-import 'dart:async';
Set numberKeyPresses;
Set operatorKeyPresses;
@@ -325,9 +324,8 @@ void flickerKey(Element key, [String postfix = '-hover']) {
}
key.classes.add('${theClass}${postfix}');
final String nextPostfix = (postfix == '-error') ? '-error' : '-press';
- new Timer(const Duration(milliseconds: 80),
- () => resetKey(key, '${theClass}${postfix}',
- '${theClass}${nextPostfix}'));
+ window.setTimeout(() => resetKey(key, '${theClass}${postfix}',
+ '${theClass}${nextPostfix}'), 80);
}
void resetKey(Element key, String classToRemove, [String classToAdd = ""]) {
@@ -335,8 +333,7 @@ void resetKey(Element key, String classToRemove, [String classToAdd = ""]) {
key.classes.remove(classToRemove);
if (classToAdd.length > 0) {
key.classes.add(classToAdd);
- new Timer(const Duration(milliseconds: 80),
- () => resetKey(key, classToAdd));
+ window.setTimeout(() => resetKey(key, classToAdd), 80);
}
}
}
« no previous file with comments | « no previous file | samples/dartcombat/setup.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698