Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/snel/core/internals/types.d.ts>Svelte2TsxComponent#$on

A Cybernetical framework for svelte applications in deno
Latest
method Svelte2TsxComponent.prototype.$on
import { Svelte2TsxComponent } from "https://deno.land/x/snel@v0.7.1/core/internals/types.d.ts";

Causes the callback function to be called whenever the component dispatches an event. A function is returned that will remove the event listener when called.

Type Parameters

K extends keyof Events & string

Parameters

event: K
handler: (e: Events[K]) => any

Returns

() => void