The following code does not run when I update the window.test
variable, I do not have any log displaying on my console. I thought that test()
would be run. Can't we make global variable reactive using svelte ?
$: window.test && test(); function test() { console.log('success'); }