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

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();
Jennifer Messerly 2013/10/10 22:35:17 didn't we think the mixin's ctor would get called?
blois 2013/10/11 22:40:12 Mixins cannot have constructors, but I'm not sure
Siggi Cherem (dart-lang) 2013/10/14 17:02:52 'createdInternal'? (something with 'created' to ma
+
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');
« pkg/polymer/lib/src/loader.dart ('K') | « samples/third_party/todomvc/web/router_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698