Command
on:click={handleClick}Explanation
Handle DOM events in Svelte with the on: directive and event handler functions.
Examples
Click event handler
on:click={handleClick}Input event handler
on:input={handleInput}Keyboard event handler
on:keydown={handleKeydown}