Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 142297

Use backbutton eventListener in svelte

$
0
0

I am trying to implement a scroll to last position functionality when the user clicks on the backbutton in the browser. So in my App.svelte, I created a window binding like this:

<svelte:window bind:scrollY={y} on:backbutton={e => console.log('FIRED')} />

My problem is that it does not work. Is there another way to use eventListeners or listen to this specific event?


Viewing all articles
Browse latest Browse all 142297

Trending Articles



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