Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Is it possible set event callback on inside a component and outside a component and have callbacks both run?

$
0
0

I want to run two functions: one on:blur inside a component, and one on the component from the outside.

// CustomInput.svelte<input on:blur={() => console.log(1)} />
// App.svelteimport CustomInput from "./CustomInput.svelte";<CustomInput on:blur={() => console.log(2)} />

When the blur event is triggered 1 is logged in the console. Is there a way to run both callbacks and get 1 and 2 logged in the console?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>