Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * A binding delegate used with Polymer elements that | 6 * A binding delegate used with Polymer elements that |
| 7 * allows for complex binding expressions, including | 7 * allows for complex binding expressions, including |
| 8 * property access, function invocation, | 8 * property access, function invocation, |
| 9 * list/map indexing, and two-way filtering. | 9 * list/map indexing, and two-way filtering. |
| 10 * | 10 * |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 _value = (_converter == null) ? v : _converter(v); | 117 _value = (_converter == null) ? v : _converter(v); |
| 118 } | 118 } |
| 119 notifyChange(new PropertyChangeRecord(_VALUE)); | 119 notifyChange(new PropertyChangeRecord(_VALUE)); |
| 120 } | 120 } |
| 121 | 121 |
| 122 get value => _value; | 122 get value => _value; |
| 123 | 123 |
| 124 set value(v) { | 124 set value(v) { |
| 125 try { | 125 try { |
| 126 assign(_expr, v, _scope); | 126 assign(_expr, v, _scope); |
| 127 notifyChange(new PropertyChangeRecord(_VALUE)); | |
|
Siggi Cherem (dart-lang)
2013/10/09 03:25:54
to clarify:
- a change in the input element will u
justinfagnani
2013/10/09 19:00:59
I think I tried removing this and ran into other i
Jennifer Messerly
2013/10/09 19:04:37
probably the right fix is:
try {
var oldValue =
| |
| 128 } on EvalException catch (e) { | 127 } on EvalException catch (e) { |
| 129 // silently swallow binding errors | 128 // silently swallow binding errors |
| 130 } | 129 } |
| 131 } | 130 } |
| 132 | 131 |
| 133 getValueWorkaround(key) { | 132 getValueWorkaround(key) { |
| 134 if (key == _VALUE) return value; | 133 if (key == _VALUE) return value; |
| 135 } | 134 } |
| 136 | 135 |
| 137 setValueWorkaround(key, v) { | 136 setValueWorkaround(key, v) { |
| 138 if (key == _VALUE) value = v; | 137 if (key == _VALUE) value = v; |
| 139 } | 138 } |
| 140 | 139 |
| 141 } | 140 } |
| OLD | NEW |