title: Window event listener in Vue
body: <p>If I add window event listeners like <code>window.addEventListener('beforeunload', (event) =&gt; { ...  })</code> in the <code>created()</code> method, do I still need to remove the listeners in <code>beforeDestroy()</code>? </p>
  
  <p>And second question: is it possible to add window events using Vue functions rather than <code>window.addEventListener</code>?</p>