SteveSanderson/knockout — pull request #875 by mbest (2013-03-06 01:18:38+00:00)
Title: Support arbitrary values for checked binding

Currently the `checked` binding uses the element's `value` property, which is always a string. But often the user would like something else as the checked value (an integer or object, for example). I propose that we add a helper binding called `checkedValue` that the checked binding will read.

Example:

```html

```

`checked` will use a `checkedValue` value if present and fall back to using `element.value` otherwise. Since a common usage is to have `$data` as a value, this can be the default if neither is set (no `checkedValue` and blank `element.value`).

`checkedValue` can write its value to `element.value` if it's a number or string. Thus is could take the place of `attr/value` for those types.