de> when the expected conditions are met.</p>
<h3 id="v02x15"><a href="#v02x15"><code>v0.2.x</code></a></h3>
<pre><code class="lang-javascript">var Component = {
    controller: function() {
        this.onunload = function(e) {
            if (condition) e.preventDefault()
        }
    },
    view: function() {
        return m(&quot;a[href=/]&quot;, {config: m.route})
    }
}
</code></pre>
<h3 id="v1x15"><a href="#v1x15"><code>v1.x</code></a></h3>
<pre><code class="lang-javascript">var Component = {
    