title: Failing to remove event listener from different scope
body: <p>I try to make an add-on for Firefox 29+ (Australis). 
  I have a menu item, on which I attach an event listener on opening 
  of each window. 
  I do it the standard way, like this: </p>
  
  <pre><code>var menuItem = document.getElementById("menuItemId");
  if(menuItem) {
     menuItem.addEventListener("click", function onClick() {
         menuItem.removeEventListener("click", onClick, false);
         // my code here;
     }, false);
  };
  </code></pre>
  
  <p>It works fine. However, my problem has as follows:</p>
  
  <p>In some cases, I want to remove the listener when entering in customization mode ("about:customizing"), which is a different scope. Of course, to load my script in this mode, i have also applied my overlay.xul in "about:customizing" uri. </p>
  
  <p>To remove the listener from this mode, I have tried the following:</p>
  
  <pre><code>WindowMediator.getMostRecentWindow("navigator:browser")
  .document.getElementById("menuItemId")
  .removeEventListener("click", onClick, false);
  
  - or -
  
  Window.top
  
  - or - 
  
  window.parent 
  
  etc
  </code></pre>
  
  <p>I have no luck with the above methods and some other similar :-( </p>
  
  <p>Any ideas? </p>