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

Unified Diff: dart/pkg/template_binding/lib/src/element.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
Index: dart/pkg/template_binding/lib/src/element.dart
===================================================================
--- dart/pkg/template_binding/lib/src/element.dart (revision 37358)
+++ dart/pkg/template_binding/lib/src/element.dart (working copy)
@@ -9,8 +9,6 @@
_ElementExtension(Element node) : super._(node);
bind(String name, value, {bool oneTime: false}) {
- _self.unbind(name);
-
Element node = _node;
if (node is OptionElement && name == 'value') {
@@ -31,7 +29,7 @@
_open(value, (x) => _updateAttribute(_node, name, conditional, x));
}
- return bindings[name] = value;
+ return _maybeUpdateBindings(name, value);
}
void _updateOption(newValue) {
@@ -40,10 +38,13 @@
var selectBinding = null;
var select = node.parentNode;
if (select is SelectElement) {
- var valueBinding = nodeBind(select).bindings['value'];
- if (valueBinding is _InputBinding) {
- selectBinding = valueBinding;
- oldValue = select.value;
+ var bindings = nodeBind(select).bindings;
+ if (bindings != null) {
+ var valueBinding = bindings['value'];
+ if (valueBinding is _InputBinding) {
+ selectBinding = valueBinding;
+ oldValue = select.value;
+ }
}
}
« no previous file with comments | « dart/pkg/template_binding/lib/src/binding_delegate.dart ('k') | dart/pkg/template_binding/lib/src/input_bindings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698