em> a property, the property value is used.</p>
<pre><code class="lang-javascript">// value is a boolean, because the `input.checked` property is boolean
var state = {
    selected: false,
    setSelected: function(selected) {state.selected = selected}
}
m(&quot;input[type=checkbox]&quot;, {onclick: m.withAttr(&quot;checked&quot;, state.setSelected)})
</code></pre>

				<hr />
				<small>License: MIT. &copy; Leo Horie.</small>
			</section>
		</main>
		<script src="lib/prism/prism.js"></script>
		<script>
	