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

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

Issue 335943003: merge to trunk all changes from 36817 until 37378 under the packages: polymer, (Closed) Base URL: http://dart.googlecode.com/svn/trunk/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
Index: pkg/template_binding/lib/src/element.dart
===================================================================
--- pkg/template_binding/lib/src/element.dart (revision 37373)
+++ 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 | « pkg/template_binding/lib/src/binding_delegate.dart ('k') | pkg/template_binding/lib/src/input_bindings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698