JavaScript - Get the parent iframe of element that was right clicked for context menu
<p>I'm developing a <strong>Firefox</strong> extension. 
I want to see if the <strong>selected text</strong> is in a editable area like in a WEBMAIL, GOOGLE DOCS, etc. If it is then some items in the context menu will be available in order to modify that text. As i happened to find these editable textareas are located inside a certain <strong>iframe</strong>.</p>

<p>After contextmenu happens how do i check if the selected text that was right clicked is inside an iframe (therefore editable) so i can make the context menu items visible? </p>

<pre>window.addEventListener("contextmenu", function(e) { 
      var menu = document.getElementById('crypt');

      if(x)
      { menu.hidden=false; }
      else
      { menu.hidden=true;  }



}, false);</pre>

<p>Thank you, 
Alex!</p>
