a></li>
</ul>
</li>
</ul>
<hr>
<h3 id="description">Description</h3>
<p>Returns an event handler that runs <code>callback</code> with the value of the specified DOM attribute</p>
<pre><code class="lang-javascript">var state = {
    value: &quot;&quot;,
    setValue: function(v) {state.value = v}
}

var Component = {
    view: function() {
        return m(&quot;input&quot;, {
            oninput: m.withAttr(&quot;value&quot;, state.setValue),
            value: state.value,
        })
    }
}

m.mount(docum