| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 part of mdv; | |
| 6 | |
| 7 /** Extensions to the [InputElement] API. */ | |
| 8 class _InputElementExtension extends _ElementExtension { | |
| 9 _InputElementExtension(InputElement node) : super(node); | |
| 10 | |
| 11 InputElement get node => super.node; | |
| 12 | |
| 13 NodeBinding createBinding(String name, model, String path) { | |
| 14 if (name == 'value') { | |
| 15 // TODO(rafaelw): Maybe template should remove all binding instructions. | |
| 16 node.attributes.remove(name); | |
| 17 return new _ValueBinding(node, model, path); | |
| 18 } | |
| 19 if (name == 'checked') { | |
| 20 node.attributes.remove(name); | |
| 21 return new _CheckedBinding(node, model, path); | |
| 22 } | |
| 23 return super.createBinding(name, model, path); | |
| 24 } | |
| 25 } | |
| OLD | NEW |