e patterns are discouraged:</p>
<h4 id="avoid-dynamic-selectors"><a href="#avoid-dynamic-selectors">Avoid dynamic selectors</a></h4>
<p>Different DOM elements have different attributes, and often different behaviors. Making a selector configurable can leak the implementation details of a component out of its unit.</p>
<pre><code class="lang-javascript">// AVOID
var BadInput = {
    view: function(vnode) {
        return m(&quot;div&quot;, [
            m(&quot;label&quot;),
            m(vnode.attrs.type ||