ject for dynamic attribute values.</p>
<pre><code class="lang-javascript">var currentURL = &quot;/&quot;

m(&quot;a.link[href=/]&quot;, {
    class: currentURL === &quot;/&quot; ? &quot;selected&quot; : &quot;&quot;
}, &quot;Home&quot;)

// equivalent HTML:
// &lt;a href=&quot;/&quot; class=&quot;link selected&quot;&gt;Home&lt;/a&gt;
</code></pre>
<p>If there are class names in both first and second arguments of <code>m()</code>, they are merged together as you would expect.</p>
<hr>
<h3 id="dom-attributes"