title: How to add window.addEventListener and remove window.removeEventListener in Vue JS
body: <p>I want to add window.addEventListener in vue js file.</p>
  <pre><code> window.addEventListener('message', (event) =&gt; {
    console.log(event, ' i am here');
   });
       
       
  </code></pre>
  <p>I have added this in mounted() function.</p>
  <p>Now, I need to remove this in destroyed method but somehow I am not able to do it.</p>
  <pre><code>window.removeEventListener('message', (event) =&gt; {
    console.log(event, ' i am here');
  });
  </code></pre>