src/bind.js
function checkbox(bind, el, param, value) {
  var attr = {type: 'checkbox', name: param.signal};
  if (value) attr.checked = true;
  var node = element('input', attr);

  el.appendChild(node);

  node.addEventListener('change', function() {
    bind.update(node.checked);
  });

  bind.elements = [node];
  bind.set = function(value) { node.checked = !!value || null; }
}
function checkbox(bind, el, param, value) {
  var attr = {type: 'checkbox', name: param.signal};
  if (value) attr.checked = true;
  var node = element('input', attr);

  el.appendChild(node);

  node.addEventListener('change', function() {
    bind.update(node.checked);
  });

  bind.elements = [node];
  bind.set = function(value) { node.checked = !!value || null; }
}
function checkbox ( bind , el , param , value ) { var attr = { type : 'checkbox' , name : param . signal } ; if ( value ) attr . checked = true ; var node = element ( 'input' , attr ) ; el . appendChild ( node ) ; node . addEventListener ( 'change' , function ( ) { bind . update ( node . checked ) ; } ) ; bind . elements = [ node ] ; bind . set = function ( value ) { node . checked = ! ! value || null ; } }
Generates a checkbox input element.
Generates a checkbox input element .