MCPcopy Index your code
hub / github.com/microsoft/SandDance / checkbox

Function checkbox

docs/app/js/sanddance-app.js:142057–142070  ·  view source on GitHub ↗

* Generates a checkbox input element.

(bind5, el, param, value2)

Source from the content-addressed store, hash-verified

142055/**
142056 * Generates a checkbox input element.
142057 */ function checkbox(bind5, el, param, value2) {
142058 const attr = {
142059 type: "checkbox",
142060 name: param.signal
142061 };
142062 if (value2) attr.checked = true;
142063 const node = element("input", attr);
142064 el.appendChild(node);
142065 node.addEventListener("change", ()=>bind5.update(node.checked));
142066 bind5.elements = [
142067 node
142068 ];
142069 bind5.set = (value)=>node.checked = !!value || null;
142070}
142071/**
142072 * Generates a selection list input element.
142073 */ function select(bind6, el, param, value3) {

Callers

nothing calls this directly

Calls 2

elementFunction · 0.70
updateMethod · 0.45

Tested by

no test coverage detected