Permalink
Browse files

Simpler syntax

  • Loading branch information...
MathieuLorber committed Oct 24, 2012
1 parent 646ceef commit 78e15bde5156072ea7bcd293627969aff25806e3
Showing with 3 additions and 3 deletions.
  1. +3 −3 labs/architecture-examples/dart/dart/TodoElement.dart
@@ -47,7 +47,7 @@ class TodoElement {
todoApp.save();
});
- void doneEditing() {
+ void doneEditing(event) {
todo.title = editElement.value.trim();
if(todo.title != '') {
contentElement.innerHTML = todo.title;
@@ -60,10 +60,10 @@ class TodoElement {
editElement.on.keyPress.add((KeyboardEvent e) {
if(e.keyIdentifier == KeyName.ENTER) {
- doneEditing();
+ doneEditing(e);
}
});
- editElement.on.blur.add((Event e) => doneEditing());
+ editElement.on.blur.add(doneEditing);
return element;
}

0 comments on commit 78e15bd

Please sign in to comment.