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

Side by Side Diff: samples/third_party/todomvc/web/elements/td_input.dart

Issue 60353013: Update TodoMVC based on https://github.com/polymer/todomvc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 library todomvc.web.elements.td_input;
2
3 import 'dart:html';
4 import 'package:polymer/polymer.dart';
5
6 @CustomTag('td-input')
7 class TodoInput extends InputElement with Polymer, Observable {
8 factory TodoInput() => new Element.tag('input', 'td-input');
9 TodoInput.created() : super.created() { polymerCreated(); }
10
11 keypressAction(e) {
12 // Listen for enter on keypress but esc on keyup, because
13 // IE doesn't fire keyup for enter.
14 if (e.keyCode == KeyCode.ENTER) {
15 fire('td-input-commit');
16 }
17 }
18
19 keyupAction(e) {
20 if (e.keyCode == KeyCode.ESC) {
21 fire('td-input-cancel');
22 }
23 }
24 }
OLDNEW
« no previous file with comments | « samples/third_party/todomvc/web/editable_label.html ('k') | samples/third_party/todomvc/web/elements/td_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698