| 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 part of mdv; | 5 part of template_binding; |
| 6 | 6 |
| 7 /** Extensions to the [Text] API. */ | 7 /** Extensions to the [Text] API. */ |
| 8 class _TextExtension extends _NodeExtension { | 8 class _TextExtension extends NodeBindExtension { |
| 9 _TextExtension(Text node) : super(node); | 9 _TextExtension(Text node) : super._(node); |
| 10 | 10 |
| 11 NodeBinding createBinding(String name, model, String path) { | 11 NodeBinding createBinding(String name, model, String path) { |
| 12 if (name == 'text') return new _TextBinding(node, model, path); | 12 if (name == 'text') return new _TextBinding(_node, model, path); |
| 13 return super.createBinding(name, model, path); | 13 return super.createBinding(name, model, path); |
| 14 } | 14 } |
| 15 } | 15 } |
| 16 | 16 |
| 17 class _TextBinding extends NodeBinding { | 17 class _TextBinding extends NodeBinding { |
| 18 _TextBinding(node, model, path) : super(node, 'text', model, path); | 18 _TextBinding(node, model, path) : super(node, 'text', model, path); |
| 19 | 19 |
| 20 void boundValueChanged(newValue) { | 20 void boundValueChanged(newValue) { |
| 21 node.text = sanitizeBoundValue(newValue); | 21 node.text = sanitizeBoundValue(newValue); |
| 22 } | 22 } |
| 23 } | 23 } |
| OLD | NEW |