ScrollY always zero

Hi there,

I’m trying to get my app to remember the scroll position before switching the page.

<IonContent onIonScrollEnd={() => 
      console.log("Y: ",window.scrollY)}>

The End of the Scroll is triggered as expected, but Y is always 0. What am I doing wrong?

Thanks