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

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

Issue 336013003: Version 1.5.0-dev.4.14 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
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 | « dart/pkg/template_binding/CHANGELOG.md ('k') | dart/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: dart/pkg/template_binding/lib/src/binding_delegate.dart
===================================================================
--- dart/pkg/template_binding/lib/src/binding_delegate.dart (revision 37358)
+++ dart/pkg/template_binding/lib/src/binding_delegate.dart (working copy)
@@ -2,11 +2,8 @@
// 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;
+part of template_binding;
-import 'dart:html';
-import 'package:template_binding/template_binding.dart' show TemplateInstance;
-
/**
* Template Bindings native features enables a wide-range of use cases,
* but (by design) don't attempt to implement a wide array of specialized
@@ -39,7 +36,7 @@
* 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 @@
*/
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 | « dart/pkg/template_binding/CHANGELOG.md ('k') | dart/pkg/template_binding/lib/src/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698