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

Unified Diff: pkg/mdv/lib/src/node.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/input_element.dart ('k') | pkg/mdv/lib/src/template.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/mdv/lib/src/node.dart
diff --git a/pkg/mdv/lib/src/node.dart b/pkg/mdv/lib/src/node.dart
new file mode 100644
index 0000000000000000000000000000000000000000..0379838f5aca8f4cf96f49b76c09eabcc878281c
--- /dev/null
+++ b/pkg/mdv/lib/src/node.dart
@@ -0,0 +1,34 @@
+// 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.
+
+part of mdv;
+
+/** Extensions to the [Node] API. */
+class _NodeExtension {
+ final Node node;
+
+ _NodeExtension(this.node);
+
+ /**
+ * Binds the attribute [name] to the [path] of the [model].
+ * Path is a String of accessors such as `foo.bar.baz`.
+ */
+ void bind(String name, model, String path) {
+ window.console.error('Unhandled binding to Node: '
+ '$this $name $model $path');
+ }
+
+ /** Unbinds the attribute [name]. */
+ void unbind(String name) {}
+
+ /** Unbinds all bound attributes. */
+ void unbindAll() {}
+
+ TemplateInstance _templateInstance;
+
+ /** Gets the template instance that instantiated this node, if any. */
+ TemplateInstance get templateInstance =>
+ _templateInstance != null ? _templateInstance :
+ (node.parent != null ? node.parent.templateInstance : null);
+}
« no previous file with comments | « pkg/mdv/lib/src/input_element.dart ('k') | pkg/mdv/lib/src/template.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698