title: "Uncaught ReferenceError: getEventListeners is not defined"
body: <p>i'm trying to remove Listeners. In console a code below is working. When i use code in Chrome extension i get: &quot;Uncaught ReferenceError: getEventListeners is not defined&quot;. Why does this happen? Is there an equivalent to the function &quot;getEventListeners&quot;?</p>
  <pre><code>document.addEventListener('click', fireContentLoadedEvent, false);
  
  function fireContentLoadedEvent () {
      console.log (&quot;DOMContentLoaded&quot;);
      for (let i = 0; i &lt; document.getElementsByClassName(&quot;someClass&quot;).length; i++) {
          plusButton = document.getElementsByClassName(&quot;someClass&quot;)[i]
  
          if ( getEventListeners(plusButton)[&quot;click&quot;].length &gt; 1) {
  
              plusButton.removeEventListener(&quot;click&quot;, getEventListeners(plusButton).click[1].listener);
  
          }
      }
  }
  </code></pre>