Skip to content
Browse files

Set element.text instead of innerHTML

  • Loading branch information...
1 parent f93bf98 commit 51955ffa6d66e0b2f3630dcbfed537bf00959446 @MathieuLorber committed Oct 24, 2012
View
4 labs/architecture-examples/dart/dart/TodoApp.dart
@@ -105,12 +105,12 @@ class TodoApp {
}
checkAllCheckboxElement.checked = (complete == todoElements.length);
int left = todoElements.length - complete;
- countElement.innerHTML = '<b>${left}</b> item${left != 1 ? 's' : ''} left';
+ countElement.text = '<b>${left}</b> item${left != 1 ? 's' : ''} left';
if(complete == 0) {
clearCompletedElement.style.display = 'none';
} else {
clearCompletedElement.style.display = 'block';
- clearCompletedElement.innerHTML = 'Clear completed (${complete})';
+ clearCompletedElement.text = 'Clear completed (${complete})';
}
updateFilter();
}
View
2 labs/architecture-examples/dart/dart/TodoElement.dart
@@ -50,7 +50,7 @@ class TodoElement {
void doneEditing(event) {
todo.title = editElement.value.trim();
if(todo.title != '') {
- contentElement.innerHTML = todo.title;
+ contentElement.text = todo.title;
element.classes.remove('editing');
} else {
removeTodo();

0 comments on commit 51955ff

Please sign in to comment.
Something went wrong with that request. Please try again.