title: How to listen to scroll events in vue nuxtjs?
body: <p>I've search for a solution and came up with this code</p>
  
  <pre><code>methods: {
    handleScroll () {
      console.log(window.scrollY)
    }
  },
  created () {
    window.addEventListener('scroll', this.handleScroll);
  },
  destroyed () {
    window.removeEventListener('scroll', this.handleScroll);
  }
  </code></pre>
  
  <p>Unfortunately, this doesn't work for me. I also tried to change window to document.body. </p>
  
  <p>The error message was <code>Window is not defined</code></p>