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

Unified Diff: samples/third_party/todomvc/web/todo_row.dart

Issue 26051002: Updating Polymer to derive from custom elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: samples/third_party/todomvc/web/todo_row.dart
diff --git a/samples/third_party/todomvc/web/todo_row.dart b/samples/third_party/todomvc/web/todo_row.dart
index 6979b724e22d7c32d0ff8edf383aab86abbe3257..9cc2f2a8d6959b2e01654027d3b3f661b97b5fae 100644
--- a/samples/third_party/todomvc/web/todo_row.dart
+++ b/samples/third_party/todomvc/web/todo_row.dart
@@ -4,19 +4,23 @@
library todomvc.web.todo_row;
+import 'dart:html';
import 'package:polymer/polymer.dart';
import 'model.dart';
-@CustomTag('todo-row')
-class TodoRow extends PolymerElement {
+@CustomTag('todo-row', type: TodoRow)
+class TodoRow extends LIElement with Polymer, ObservableMixin {
@published Todo todo;
bool get applyAuthorStyles => true;
- void created() {
- super.created();
+ factory TodoRow() => new Element.tag('todo-row');
+
+ TodoRow.created() : super.created() {
+ initialize();
+
var root = getShadowRoot("todo-row");
- var label = root.query('#label').xtag;
+ var label = root.query('#label');
var item = root.query('.todo-item');
bindCssClass(item, 'completed', this, 'todo.done');

Powered by Google App Engine
This is Rietveld 408576698