How to pass parameters to on:click in Svelte? : <p>Binding a function to a button is easy and straightforward:</p>

<pre><code>&lt;button on:click={handleClick}&gt;
    Clicks are handled by the handleClick function!
&lt;/button&gt;
</code></pre>

<p>But I don't see a way to pass parameters (arguments) to the function, when I do this:</p>

<pre><code>&lt;button on:click={handleClick("parameter1")}&gt;
    Oh no!
&lt;/button&gt;
</code></pre>

<p>The function is called on page load, and never again.</p>

<p>Is it possible at all to pass parameters to function called from <code>on:click{}</code>?</p>

<p><hr>
<strong>EDIT:</strong></p>

<p>I just found a hacky way to do it. Calling the function from an inline handler works.</p>

<pre><code>&lt;button on:click={() =&gt; handleClick("parameter1")}&gt;
    It works...
&lt;/button&gt;
</code></pre>
