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

Unified Diff: client/samples/sunflower/Sunflower.dart

Issue 8835006: New version of dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typos Created 9 years 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/isolate/IsolateSample.dart ('k') | client/samples/total/src/ColorPicker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/samples/sunflower/Sunflower.dart
diff --git a/client/samples/sunflower/Sunflower.dart b/client/samples/sunflower/Sunflower.dart
index 1d97b8c7688d489524d3c4e7a54c0b44568974e6..db90918d07348a2b35baa892b5077aa2847c7d73 100644
--- a/client/samples/sunflower/Sunflower.dart
+++ b/client/samples/sunflower/Sunflower.dart
@@ -4,7 +4,7 @@
#library('sunflower');
-#import('dart:dom');
+#import('dart:html');
#resource('sunflower.css');
@@ -16,14 +16,13 @@ class Sunflower {
Sunflower() {
PHI = (Math.sqrt(5) + 1) / 2;
- var doc = window.document;
- HTMLCanvasElement canvas = doc.getElementById("canvas");
+ CanvasElement canvas = document.query("#canvas");
xc = yc = MAX_D / 2;
ctx = canvas.getContext("2d");
- HTMLInputElement slider = doc.getElementById("slider");
- slider.addEventListener('change', (Event e) {
+ InputElement slider = document.query("#slider");
+ slider.on.change.add((Event e) {
seeds = Math.parseInt(slider.value);
drawFrame();
}, true);
« no previous file with comments | « client/samples/isolate/IsolateSample.dart ('k') | client/samples/total/src/ColorPicker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698