one would normally expect.</p>
<hr>
<h3 id="attributes-and-properties">Attributes and properties</h3>
<p>The first argument of <code>m.withAttr()</code> can be either an attribute or a property.</p>
<pre><code class="lang-javascript">// reads from `select.selectedIndex` property
var state = {
    index: 0,
    setIndex: function(index) {state.index = index}
}
m(&quot;select&quot;, {onclick: m.withAttr(&quot;selectedIndex&quot;, state.setIndex)})
</code></pre>
<p>If a value can be both an attribute <em>and</