Chromium Code Reviews| Index: tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate |
| diff --git a/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate |
| index bcac38d718c815385ecbae66eca6536540e9ff7f..4d86b946720c74c6230666d0cfdb6d5a18141a7d 100644 |
| --- a/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate |
| +++ b/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate |
| @@ -38,6 +38,57 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS implements |
| } |
| return e; |
| } |
| + |
| + _ValueBinding _valueBinding; |
| + _CheckedBinding _checkedBinding; |
|
blois
2013/05/01 17:00:42
valueAsNumber and valueAsDate in the future? Or sh
Jennifer Messerly
2013/05/01 17:56:34
yeah, type conversion or filters or something for
|
| + |
| + @Experimental |
| + void bind(String name, model, String path) { |
| + switch (name) { |
| + case 'value': |
| + unbind('value'); |
| + attributes.remove('value'); |
| + _valueBinding = new _ValueBinding(this, model, path); |
| + break; |
| + case 'checked': |
| + unbind('checked'); |
| + attributes.remove('checked'); |
| + _checkedBinding = new _CheckedBinding(this, model, path); |
| + break; |
| + default: |
| + super.bind(name, model, path); |
| + break; |
| + } |
| + } |
| + |
| + @Experimental |
| + void unbind(String name) { |
| + switch (name) { |
| + case 'value': |
| + if (_valueBinding != null) { |
| + _valueBinding.unbind(); |
| + _valueBinding = null; |
| + } |
| + break; |
| + case 'checked': |
| + if (_checkedBinding != null) { |
| + _checkedBinding.unbind(); |
| + _checkedBinding = null; |
| + } |
| + break; |
| + default: |
| + super.unbind(name); |
| + break; |
| + } |
| + } |
| + |
| + @Experimental |
| + void unbindAll() { |
| + unbind('value'); |
| + unbind('checked'); |
| + super.unbindAll(); |
| + } |
| + |
| $!MEMBERS |
| } |