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

Unified Diff: pkg/mdv/lib/src/text.dart

Issue 17552019: Reorganize mdv and observe packages (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged Created 7 years, 6 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
« no previous file with comments | « pkg/mdv/lib/src/template.dart ('k') | pkg/mdv/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/mdv/lib/src/text.dart
diff --git a/tools/dom/templates/html/impl/impl_Text.darttemplate b/pkg/mdv/lib/src/text.dart
similarity index 59%
copy from tools/dom/templates/html/impl/impl_Text.darttemplate
copy to pkg/mdv/lib/src/text.dart
index 2675d8bc677850f05ed3f789fefee30f3a9eac9b..6d2b380011938a85dc7227b7feb82f221b42a7fc 100644
--- a/tools/dom/templates/html/impl/impl_Text.darttemplate
+++ b/pkg/mdv/lib/src/text.dart
@@ -1,21 +1,17 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+part of mdv;
-part of $LIBRARYNAME;
+/** Extensions to the [Text] API. */
+class _TextExtension extends _NodeExtension {
+ _TextExtension(Text node) : super(node);
-$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME(String data) => document.$dom_createTextNode(data);
-$!MEMBERS
+ Text get node => super.node;
-$if DART2JS
- @Creates('Null') // Set from Dart code; does not instantiate a native type.
-$endif
StreamSubscription _textBinding;
- @Experimental
void bind(String name, model, String path) {
if (name != 'text') {
super.bind(name, model, path);
@@ -25,11 +21,10 @@ $endif
unbind('text');
_textBinding = new PathObserver(model, path).bindSync((value) {
- text = value == null ? '' : '$value';
+ node.text = value == null ? '' : '$value';
});
}
- @Experimental
void unbind(String name) {
if (name != 'text') {
super.unbind(name);
@@ -42,7 +37,6 @@ $endif
_textBinding = null;
}
- @Experimental
void unbindAll() {
unbind('text');
super.unbindAll();
« no previous file with comments | « pkg/mdv/lib/src/template.dart ('k') | pkg/mdv/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698