| Index: dart/pkg/template_binding/lib/src/instance_binding_map.dart
|
| ===================================================================
|
| --- dart/pkg/template_binding/lib/src/instance_binding_map.dart (revision 37358)
|
| +++ dart/pkg/template_binding/lib/src/instance_binding_map.dart (working copy)
|
| @@ -71,3 +71,17 @@
|
| _processBindings(clone, bindings, model, instanceBindings);
|
| return clone;
|
| }
|
| +
|
| +// TODO(rafaelw): Setup a MutationObserver on content which clears the expando
|
| +// so that bindingMaps regenerate when template.content changes.
|
| +_getInstanceBindingMap(DocumentFragment content, BindingDelegate delegate) {
|
| + if (delegate == null) delegate = BindingDelegate._DEFAULT;
|
| +
|
| + if (delegate._bindingMaps == null) delegate._bindingMaps = new Expando();
|
| + var map = delegate._bindingMaps[content];
|
| + if (map == null) {
|
| + map = _createInstanceBindingMap(content, delegate);
|
| + delegate._bindingMaps[content] = map;
|
| + }
|
| + return map;
|
| +}
|
|
|