title: How to listen to the window scroll event in a VueJS component?
body: <p>I want to listen to the window scroll event in my Vue component. Here is what I tried so far:</p>
  
  <pre><code>&lt;my-component v-on:scroll="scrollFunction"&gt;
      ...
  &lt;/my-component&gt;
  </code></pre>
  
  <p>With the <code>scrollFunction(event)</code> being defined in my component methods but it doesn't seem to work.</p>
  
  <p>Anyone has any idea how to do this?</p>
  
  <p>Thanks!</p>