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

Unified Diff: pkg/template_binding/lib/src/binding_delegate.dart

Issue 307793002: update polymer, nodebind, and templatebinding (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/template_binding/CHANGELOG.md ('k') | pkg/template_binding/lib/src/element.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/template_binding/lib/src/binding_delegate.dart
diff --git a/pkg/template_binding/lib/src/binding_delegate.dart b/pkg/template_binding/lib/src/binding_delegate.dart
index 4d9f8d26a9cc6634b9351f25e94647af1e6ec219..215c9f34254a92b8cfe2f710afd0847804b05dd1 100644
--- a/pkg/template_binding/lib/src/binding_delegate.dart
+++ b/pkg/template_binding/lib/src/binding_delegate.dart
@@ -2,10 +2,7 @@
// 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.
-library template_binding.src.binding_delegate;
-
-import 'dart:html';
-import 'package:template_binding/template_binding.dart' show TemplateInstance;
+part of template_binding;
/**
* Template Bindings native features enables a wide-range of use cases,
@@ -39,7 +36,7 @@ import 'package:template_binding/template_binding.dart' show TemplateInstance;
* for more information about the binding delegate.
*/
// TODO(jmesserly): need better api docs here. The link above seems out of date.
-abstract class BindingDelegate {
+class BindingDelegate {
/**
* Prepares a binding. This is called immediately after parsing a mustache
* token with `{{ path }}` in the context of the [node] and the property named
@@ -64,6 +61,13 @@ abstract class BindingDelegate {
*/
PrepareInstancePositionChangedFunction prepareInstancePositionChanged(
Element template) => null;
+
+ Expando<_InstanceBindingMap> _bindingMaps;
+
+ // TODO(jmesserly): if we have use this everywhere, we can avoid many
+ // delegate != null checks throughout the code, simplifying things.
+ // For now we just use it for _bindingMaps.
+ static final _DEFAULT = new BindingDelegate();
}
typedef PrepareBindingFunction(model, Node node, bool oneTime);
« no previous file with comments | « pkg/template_binding/CHANGELOG.md ('k') | pkg/template_binding/lib/src/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698