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

Side by Side Diff: src/site/docs/tutorials/add-elements/examples/todo/todo.dart

Issue 26542002: edit pass on T3,4,5, updated images (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: merging with master Created 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 import 'dart:html';
2
3 InputElement toDoInput;
4 UListElement toDoList;
5
6 void main() {
7 toDoInput = query('#to-do-input');
8 toDoList = query('#to-do-list');
9 toDoInput.onChange.listen(addToDoItem);
10 }
11
12 void addToDoItem(Event e) {
13 var newToDo = new LIElement();
14 newToDo.text = toDoInput.value;
15 toDoInput.value = '';
16 toDoList.children.add(newToDo);
17 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698