ee8c7f77 by Michael Richards

Set input value for radio buttons as el.checked.

1 parent 0c9223d6
......@@ -25,6 +25,7 @@
case 'select-one':
return el.value;
case 'checkbox':
case 'radio':
return el.checked;
}
};
......
......@@ -17,7 +17,7 @@ registerBinding = (el, adapter, type, context, keypath) ->
getInputValue = (el) ->
switch el.type
when 'text', 'textarea', 'password', 'select-one' then el.value
when 'checkbox' then el.checked
when 'checkbox', 'radio' then el.checked
attributeBinding = (attr) -> (el, value) ->
if value then el.setAttribute attr, value else el.removeAttribute attr
......